예제 #1
0
        public void Validate_DefaultValue()
        {
            GarmentShippingLocalPriceCorrectionNoteViewModel viewModel = new GarmentShippingLocalPriceCorrectionNoteViewModel();

            var result = viewModel.Validate(null);

            Assert.NotEmpty(result.ToList());
        }
예제 #2
0
        public void Validate_EmptyValue()
        {
            GarmentShippingLocalPriceCorrectionNoteViewModel viewModel = new GarmentShippingLocalPriceCorrectionNoteViewModel
            {
                salesNote = new GarmentShippingLocalSalesNoteViewModel {
                    Id = 0
                },
                correctionDate = DateTimeOffset.MinValue,
                items          = new List <GarmentShippingLocalPriceCorrectionNoteItemViewModel>()
            };

            var result = viewModel.Validate(null);

            Assert.NotEmpty(result.ToList());
        }
예제 #3
0
        public void Validate_ItemsDefaultValue()
        {
            GarmentShippingLocalPriceCorrectionNoteViewModel viewModel = new GarmentShippingLocalPriceCorrectionNoteViewModel();

            viewModel.items = new List <GarmentShippingLocalPriceCorrectionNoteItemViewModel>
            {
                new GarmentShippingLocalPriceCorrectionNoteItemViewModel()
                {
                    isChecked = true
                }
            };

            var result = viewModel.Validate(null);

            Assert.NotEmpty(result.ToList());
        }