소스 검색

OrganisationService::findByName test

Andrew Grant 6 달 전
부모
커밋
8d532ceb71
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      src/test/java/scot/carricksoftware/grants/services/places/organisations/OrganisationServiceTest.java

+ 8 - 0
src/test/java/scot/carricksoftware/grants/services/places/organisations/OrganisationServiceTest.java

@@ -25,6 +25,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
+import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRandomString;
 import static scot.carricksoftware.grants.GenerateRandomNumberValues.GetRandomLong;
 import static scot.carricksoftware.grants.GenerateRandomPlaceValues.GetRandomOrganisation;
 
@@ -82,5 +83,12 @@ public class OrganisationServiceTest {
         assertEquals(result, organisationService.getPagedOrganisations(0));
     }
 
+    @Test
+    public void getFindByNameTest() {
+        String name = GetRandomString();
+        organisationService.findByName(name);
+        verify(organisationRepositoryMock).findByName(name);
+    }
+
 
 }