Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package com.va2es.backend.user.service;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -14,14 +10,12 @@
import com.va2es.backend.models.enums.UserRole;
import com.va2es.backend.repositories.UserRepository;
import com.va2es.backend.services.UserService;
import com.va2es.backend.dto.RegisterDTO;
import com.va2es.backend.dto.AuthDTO;

import jakarta.persistence.EntityNotFoundException;
import static org.junit.Assert.*;

@RunWith(SpringRunner.class)
@SpringBootTest
public class UserServiceTeste {
public class UserServiceTest {

@Autowired
private UserRepository userRepository;
Expand Down Expand Up @@ -54,7 +48,7 @@ public void deveDeletarUsuarioComSucesso() {

userRepository.deleteById(user.getId());

assertTrue(!userRepository.existsById(user.getId()));
assertFalse(userRepository.existsById(user.getId()));
}

@Test
Expand Down