public void Should_Success_Validate_Data_Koreksi_Harga_Retur()
        {
            GarmentCorrectionNoteViewModel viewModel = new GarmentCorrectionNoteViewModel
            {
                CorrectionType = "Retur",
                DONo           = "DONo",
                Items          = new List <GarmentCorrectionNoteItemViewModel>
                {
                    new GarmentCorrectionNoteItemViewModel
                    {
                        QuantityCheck = 100,
                        Quantity      = 0
                    },
                }
            };

            Assert.True(viewModel.Validate(null).Count() > 0);

            GarmentCorrectionNoteViewModel viewModel2 = new GarmentCorrectionNoteViewModel
            {
                CorrectionType = "Retur",
                DONo           = "DONo",
                Items          = new List <GarmentCorrectionNoteItemViewModel>
                {
                    new GarmentCorrectionNoteItemViewModel
                    {
                        QuantityCheck = 100,
                        Quantity      = 500
                    },
                }
            };

            Assert.True(viewModel2.Validate(null).Count() > 0);
        }
Пример #2
0
        public void Should_Success_Validate_Data_Null_Items()
        {
            GarmentCorrectionNoteViewModel viewModel = new GarmentCorrectionNoteViewModel
            {
                CorrectionType = "Harga Satuan",
                DONo           = "DONo",
            };

            Assert.True(viewModel.Validate(null).Count() > 0);
        }
Пример #3
0
        public void Should_Success_Validate_Data_Koreksi_Harga_Jumlah()
        {
            GarmentCorrectionNoteViewModel viewModel = new GarmentCorrectionNoteViewModel
            {
                CorrectionType = "Jumlah",
                DONo           = "DONo",
                Items          = new List <GarmentCorrectionNoteItemViewModel>
                {
                    new GarmentCorrectionNoteItemViewModel
                    {
                        Quantity = 0
                    },
                }
            };

            Assert.True(viewModel.Validate(null).Count() > 0);
        }
Пример #4
0
        public void Should_Success_Validate_Data_Koreksi_Harga_Total()
        {
            GarmentCorrectionNoteViewModel viewModel = new GarmentCorrectionNoteViewModel
            {
                CorrectionType = "Harga Total",
                DONo           = "DONo",
                Items          = new List <GarmentCorrectionNoteItemViewModel>
                {
                    new GarmentCorrectionNoteItemViewModel
                    {
                        PriceTotalAfter = -1,
                    },
                    new GarmentCorrectionNoteItemViewModel
                    {
                        PriceTotalBefore = 1,
                        PriceTotalAfter  = 1,
                    }
                }
            };

            Assert.True(viewModel.Validate(null).Count() > 0);
        }
        public void Should_Success_Validate_Data_Koreksi_Harga_Jumlah()
        {
            GarmentCorrectionNoteViewModel viewModel = new GarmentCorrectionNoteViewModel
            {
                CorrectionType = "Jumlah",
                DONo           = "DONo",
                Items          = new List <GarmentCorrectionNoteItemViewModel>
                {
                    new GarmentCorrectionNoteItemViewModel
                    {
                        Quantity = 0,

                        DODetailId     = 0,
                        EPOId          = 0,
                        EPONo          = null,
                        PRId           = 0,
                        PRNo           = null,
                        POId           = 0,
                        POSerialNumber = null,
                        RONo           = null,
                        Product        = null,
                        Uom            = null
                    },
                },

                DOId            = 0,
                Currency        = null,
                IncomeTax       = null,
                Remark          = null,
                TotalCorrection = 0,
                NKPH            = null,
                NKPN            = null
            };

            Assert.True(viewModel.Validate(null).Count() > 0);
        }
Пример #6
0
        public void Should_Success_Validate_Data()
        {
            GarmentCorrectionNoteViewModel AllNullViewModel = new GarmentCorrectionNoteViewModel();

            Assert.True(AllNullViewModel.Validate(null).Count() > 0);
        }