public void Validate_DefaultValue() { GarmentShippingLocalSalesNoteViewModel viewModel = new GarmentShippingLocalSalesNoteViewModel(); var result = viewModel.Validate(null); Assert.NotEmpty(result.ToList()); }
public void Validate_EmptyValue() { GarmentShippingLocalSalesNoteViewModel viewModel = new GarmentShippingLocalSalesNoteViewModel { date = DateTimeOffset.MinValue, transactionType = new TransactionType { id = 0 }, buyer = new Buyer { Id = 0 }, tempo = 0, paymentType = "TEMPO" }; var result = viewModel.Validate(null); Assert.NotEmpty(result.ToList()); }
public void Validate_ItemsEmptyValue() { GarmentShippingLocalSalesNoteViewModel viewModel = new GarmentShippingLocalSalesNoteViewModel(); viewModel.items = new List <GarmentShippingLocalSalesNoteItemViewModel> { new GarmentShippingLocalSalesNoteItemViewModel { product = new ProductViewModel { id = 0 }, uom = new UnitOfMeasurement { Id = 0 } } }; var result = viewModel.Validate(null); Assert.NotEmpty(result.ToList()); }