Created
April 11, 2020 10:25
-
-
Save 0001vrn/ab44f47fd1b2a8532336ce63c0f88ee3 to your computer and use it in GitHub Desktop.
This file contains 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 characters
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); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment