Ejemplo n.º 1
0
        public void ListDataTest()
        {
            using (var trans = TransHelper.NewScope())
            {
                //  arrange
                var expected1 = StokAdjustment2DataFactory();
                //var expected2 = StokAdjustment22DataFactory();
                var expected2 = expected1.CloneObject();
                expected2.BrgID             = "B2";
                expected2.StokAdjustmentID2 = "C2";
                _stokAdjustment2Dal.Insert(expected1);
                _stokAdjustment2Dal.Insert(expected2);
                var expected = new List <StokAdjustment2Model>
                {
                    expected1, expected2
                };

                //  act
                var actual = _stokAdjustment2Dal.ListData(expected1.StokAdjustmentID);

                //  assert
                actual.Should().BeEquivalentTo(expected,
                                               config => config
                                               .Excluding(x => x.BrgName));
            }
        }
Ejemplo n.º 2
0
        public StokAdjustmentModel GetData(string id)
        {
            var header = _stokAdjustmentDal.GetData(id);

            if (header != null)
            {
                var detil = _stokAdjustment2Dal.ListData(id);
                if (detil != null)
                {
                    header.ListBrg = detil;
                }
            }
            return(header);
        }