public void ValidateDefault() { WeavingSalesContractViewModel viewModel = new WeavingSalesContractViewModel() { Product = new ProductViewModel() { Id = 0 } }; var result = viewModel.Validate(null); Assert.True(result.Count() > 0); }
public void Validate_When_Data_Agent_Exist() { WeavingSalesContractViewModel viewModel = new WeavingSalesContractViewModel() { Agent = new AgentViewModel() { Id = 1 }, Buyer = new BuyerViewModel() { Id = 1, Type = "ekspor", }, Product = new ProductViewModel() { Id = 0 } }; var result = viewModel.Validate(null); Assert.True(result.Count() > 0); }