Exemple #1
0
        public void TestMethod1()
        {
            GenericUnitOfWork  uow = new GenericUnitOfWork();
            DistributorService distributorService = new DistributorService(uow);
            bool SavedAll = distributorService.AddRange(new List <_Distributor>()
            {
                new _Distributor()
                {
                    DistributorName        = "Cty ABC",
                    RegionId               = 34,
                    DistributorAddress     = "552 Quang Trung, Go Vap, TP Ho Chi Minh",
                    DistributorEmail       = "*****@*****.**",
                    DistributorPhoneNumber = "0120000001",
                    Status      = "Cooperating",
                    Description = "No Describe anymore"
                },
                new _Distributor()
                {
                    DistributorName        = "Cty XYZ",
                    RegionId               = 48,
                    DistributorAddress     = "789 Nguyễn Huệ, Đống Đa, TP Hà Nội",
                    DistributorEmail       = "*****@*****.**",
                    DistributorPhoneNumber = "0120000002",
                    Status      = "Cooperating",
                    Description = "No Describe anymore"
                },
            });

            Assert.AreEqual(true, SavedAll);
        }