public void SaveSuccessTest() { var testValue = new TestValue(); var babyDiaperRetentionServiceHelper = MockHelperTestServiceHelper.GetBabyDiaperRetentionServiceHelper( testValue ); var target = new BabyDiaperRetentionService(new NLogLoggerFactory()) { BabyDiaperRetentionServiceHelper = babyDiaperRetentionServiceHelper }; var actual = target.Save(new BabyDiaperRetentionEditViewModel()); Assert.Equal(testValue, actual); }
public void SaveFailTest() { var testValue = new TestValue(); var babyDiaperRetentionServiceHelper = MockHelperTestServiceHelper.GetBabyDiaperRetentionServiceHelper( testValue ); var target = new BabyDiaperRetentionService(new NLogLoggerFactory()) { BabyDiaperRetentionServiceHelper = babyDiaperRetentionServiceHelper }; var actual = target.Save(null); Assert.Equal(null, actual); }