Skip to content

Commit

Permalink
refs #4
Browse files Browse the repository at this point in the history
  • Loading branch information
VitorAmrm authored Feb 8, 2021
1 parent 4b44cf5 commit 984fa87
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ public class SaveProfileTest {

@Test
public void saveProfileWithIdEquals3() {
Profile testeVar = new Profile(3L,"Ola, meu nome é tchau");
Profile testeVar = new Profile(3L,"Ola, algo sobre mim");
when(repo.findById(3L)).thenReturn(Optional.of(testeVar));
when(repo.save(any(Profile.class))).thenReturn(testeVar);

Profile testing = service.saveProfile(testeVar);

Assertions.assertEquals("Ola, meu nome é tchau", testing.getAbout());
Assertions.assertEquals("Ola, algo sobre mim", testing.getAbout());
verify(repo,times(1)).findById(any(Long.class));
verify(repo,times(1)).save(any(Profile.class));

Expand Down

0 comments on commit 984fa87

Please sign in to comment.