Created
April 11, 2020 10:25
-
-
Save 0001vrn/ab44f47fd1b2a8532336ce63c0f88ee3 to your computer and use it in GitHub Desktop.
Revisions
-
0001vrn created this gist
Apr 11, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ class ChgRequestServiceImplTest { private ChgRequestServiceImpl chgRequestService; @Mock private ChgRequestRepository chgRequestRepository; @BeforeEach void setUp() { MockitoAnnotations.initMocks(this); chgRequestService = new ChgRequestServiceImpl(chgRequestRepository); } @Test void shouldCreateChgRequest_thenSaveIt() { var alpha = new AppMetadata("alpha", "1.3.1", "random jira link", "prod-us-west-2", "rolling out new feature"); var id = chgRequestService.createChgRequest(alpha); verify(chgRequestRepository).save(any(ChgRequest.class)); assertNotNull(id); } }