public void GetTestSheetIdTestNotExisting() { var serviceHelperBllMoq = MockHelperBll.GetLaborCreatorsBll(null, new List <TestSheet>()); var target = new LaborCreatorService(new NLogLoggerFactory()) { LaborCreatorBll = serviceHelperBllMoq }; var actual = target.GetTestSheetId("666"); actual.Should() .BeNull("because it is not found"); }
public void GetTestSheetIdTest() { var serviceHelperBllMoq = MockHelperBll.GetLaborCreatorsBll(new TestSheet { FaNr = "666" }, new List <TestSheet>()); var target = new LaborCreatorService(new NLogLoggerFactory()) { LaborCreatorBll = serviceHelperBllMoq }; var actual = target.GetTestSheetId("666"); actual.FaNr.Should() .Be("666"); }
public void GetLaborCreatorViewModelTestNotExisting() { var serviceHelperBllMoq = MockHelperBll.GetLaborCreatorsBll(null, null); var target = new LaborCreatorService(new NLogLoggerFactory()) { LaborCreatorBll = serviceHelperBllMoq }; var actual = target.GetLaborCreatorViewModel(); actual.ChosenPo.Should() .BeNullOrEmpty("because it will be filled by user"); actual.Message.Should() .BeNullOrEmpty("because it is for error messages"); actual.ProductionOrders.Should() .BeNullOrEmpty("because there are no existing"); }
public void GetLaborCreatorViewModelTest() { var serviceHelperBllMoq = MockHelperBll.GetLaborCreatorsBll(new TestSheet(), new List <TestSheet> { new TestSheet(), new TestSheet() }); var target = new LaborCreatorService(new NLogLoggerFactory()) { LaborCreatorBll = serviceHelperBllMoq }; var actual = target.GetLaborCreatorViewModel(); actual.ChosenPo.Should() .BeNullOrEmpty("because it will be filled by user"); actual.Message.Should() .BeNullOrEmpty("because it is for error messages"); actual.ProductionOrders.Count.Should() .Be(2); }