public void MockDefinitionValidatorHostNullSuccessTest() { var mockDefinitionFake = new Faker <MockDefinition>() .RuleFor(m => m.Host, f => null); var input = new { mockDefinition = mockDefinitionFake.Generate() }; var Target = new MockDefinitionValidator(); Target.ShouldNotHaveValidationErrorFor(m => m.Host, input.mockDefinition.Host); }
public void MockDefinitionValidatorBasePathEmptySuccessTest() { var mockDefinitionFake = new Faker <MockDefinition>() .RuleFor(m => m.BasePath, f => string.Empty); var input = new { mockDefinition = mockDefinitionFake.Generate() }; var Target = new MockDefinitionValidator(); Target.ShouldNotHaveValidationErrorFor(m => m.BasePath, input.mockDefinition.BasePath); }
public void MockDefinitionValidatorSuccessTest(string host) { var mockDefinitionFake = new Faker <MockDefinition>() .RuleFor(m => m.Host, f => host); var input = new { mockDefinition = mockDefinitionFake.Generate(10) }; var Target = new MockDefinitionValidator(); foreach (var item in input.mockDefinition) { Target.ShouldNotHaveValidationErrorFor(m => m.Host, item.Host); } }