public void Create_ShouldCreateWebApiProject() { var solution = new Mock <ISolution>().Object; var webApiMock = new Mock <IWebApiLayer>(); webApiMock.Setup(s => s.Create(It.IsAny <string>(), It.IsAny <string>())); var useCase = new CreateWebApiUseCase(new List <IDefaultLayer>(), solution, webApiMock.Object); useCase.Create("path", "projectName"); webApiMock.Verify(s => s.Create("path", "projectName"), Times.Once); }
public void Create_ShouldNotCreateDefaultLayer_WhenDefaultLayerListIsEmpty() { var solution = new Mock <ISolution>().Object; var defaultLayerMock = new Mock <IDefaultLayer>(); defaultLayerMock.Setup(s => s.Create(It.IsAny <string>(), It.IsAny <string>())); var webApi = new Mock <IWebApiLayer>().Object; var useCase = new CreateWebApiUseCase(new List <IDefaultLayer>(), solution, webApi); useCase.Create("path", "projectName"); defaultLayerMock.Verify(s => s.Create("path", "projectName"), Times.Never); }