public void validate_default() { OperationalCostViewModel viewModel = new OperationalCostViewModel(); var result = viewModel.Validate(null); Assert.True(0 < result.Count()); }
public virtual void ValidateVM() { var dbContext = DbContext(GetCurrentMethod()); var serviceProvider = GetServiceProviderMock(dbContext).Object; DirectLaborCostFacade facade = new DirectLaborCostFacade(serviceProvider, dbContext); var data = new OperationalCostViewModel() { }; System.ComponentModel.DataAnnotations.ValidationContext validationContext = new System.ComponentModel.DataAnnotations.ValidationContext(data, serviceProvider, null); var response = data.Validate(validationContext); Assert.NotEmpty(response); }