public void ModelIsNull() { // Arrange var validator = new OrganizationIdValidator(null, commonService); // Act validator.Validate(controller.ModelState); // Assert controller.ModelState.IsValid.Should().BeTrue(); }
public void ModelSetAndOrganizationNotExists() { // Arrange commonServiceMockSetup.Setup(c => c.OrganizationExists(It.IsAny <Guid>(), PublishingStatus.Published)).Returns(false); var validator = new OrganizationIdValidator(Guid.NewGuid().ToString(), commonService); // Act validator.Validate(controller.ModelState); // Assert controller.ModelState.IsValid.Should().BeFalse(); }