public void ModelIsNull() { // Arrange var validator = new LifeEventListValidator(null, fintoService); // Act validator.Validate(controller.ModelState); // Assert controller.ModelState.IsValid.Should().BeTrue(); }
public void ModelSetAndFintoItemsNotExist() { // Arrange fintoServiceMockSetup.Setup(g => g.GetLifeEventByUri(It.IsAny <string>())).Returns((IVmOpenApiFintoItemVersionBase)null); var validator = new LifeEventListValidator(list, fintoService); // Act validator.Validate(controller.ModelState); // Assert controller.ModelState.IsValid.Should().BeFalse(); }
public void ModelIncludesNullAndFintoItemsExist() { // Arrange fintoServiceMockSetup.Setup(g => g.GetLifeEventByUri(It.IsNotNull <string>())).Returns(new VmOpenApiFintoItemVersionBase() { Id = Guid.NewGuid() }); var validator = new LifeEventListValidator(list, fintoService); // Act validator.Validate(controller.ModelState); // Assert controller.ModelState.IsValid.Should().BeFalse(); }