Example #1
0
        public void TestShouldDelete()
        {
            HistoricoVendas hv = new HistoricoVendas(1, 10, 20);

            using (HistoricoVendasSession s = new HistoricoVendasSession())
            {
                using (var das = s.CreateDataAccessScope(true))
                {
                    IMapperHistoricoVendas map = s.CreateMapperHistoricoVendas();
                    map.Create(hv);
                    map.Delete(hv);

                    map.Read(hv.FranqId, hv.ProdId);
                }
            }
        }
Example #2
0
        public void TestShouldRead()
        {
            HistoricoVendas hv = new HistoricoVendas(1, 10, 20);

            using (HistoricoVendasSession s = new HistoricoVendasSession())
            {
                using (var das = s.CreateDataAccessScope(true))
                {
                    IMapperHistoricoVendas map = s.CreateMapperHistoricoVendas();
                    map.Create(hv);
                    HistoricoVendas actual = map.Read(hv.FranqId, hv.ProdId);

                    Assert.AreEqual(hv.Hist3Anos, actual.Hist3Anos);
                }
            }
        }