public void Validate_DefaultValue() { GarmentDraftPackingListItemViewModels viewModel = ViewModel; var result = viewModel.Validate(null); Assert.NotEmpty(result.ToList()); }
public void Validate_DetailsDefaultValue() { GarmentDraftPackingListItemViewModels viewModel = ViewModel; viewModel.Items = new List <GarmentDraftPackingListItemViewModel> { new GarmentDraftPackingListItemViewModel { Details = new List <GarmentDraftPackingListDetailViewModel> { new GarmentDraftPackingListDetailViewModel() } } }; var result = viewModel.Validate(null); Assert.NotEmpty(result.ToList()); }
public void Validate_QuantityDifferent() { GarmentDraftPackingListItemViewModels viewModel = ViewModel; foreach (var item in viewModel.Items) { foreach (var detail in item.Details) { foreach (var size in detail.Sizes) { size.Quantity = 1; } detail.QuantityPCS = 2; detail.CartonQuantity = 3; } item.Quantity = 4; } var result = viewModel.Validate(null); Assert.NotEmpty(result.ToList()); }