Commit 17cf929d authored by Khalid Ali's avatar Khalid Ali
Browse files

addListing service test added

parent 35ee51ff
...@@ -18,6 +18,10 @@ plugins { ...@@ -18,6 +18,10 @@ plugins {
id "org.sonarqube" version "2.6" id "org.sonarqube" version "2.6"
} }
plugins {
id 'jacoco'
}
flyway { flyway {
url= "jdbc:postgresql://localhost:26257/testdb" url= "jdbc:postgresql://localhost:26257/testdb"
user= "user17" user= "user17"
......
...@@ -84,4 +84,15 @@ public class ListingEntityServiceIntegrationTest { ...@@ -84,4 +84,15 @@ public class ListingEntityServiceIntegrationTest {
Mockito.verify(EmployeeServiceImplTestContextConfiguration.listingRepository, Mockito.times(1)).deleteById(9182381L); Mockito.verify(EmployeeServiceImplTestContextConfiguration.listingRepository, Mockito.times(1)).deleteById(9182381L);
} }
@Test
public void whenAddListingByEntity_thenListingShouldBeReturned() {
ListingEntity listingEntity4 = new ListingEntity(1234560, 3, 14.99,
new Date(), 192838079872L, 2879878394L, "Title Calc 3");
Mockito.when(EmployeeServiceImplTestContextConfiguration.listingRepository.save(listingEntity4))
.thenReturn(listingEntity4);
listingService.addListing(listingEntity4);
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment