Пример #1
0
        public async Task AtadasTestNincsXKitol()
        {
            var dbb = new DbContextOptionsBuilder <RaktarContext>();

            dbb.UseSqlServer(connstrin);


            RaktarContext  rc = new RaktarContext(dbb.Options);
            HomeRepository hr = new HomeRepository(rc);

            var eszkoz = (await hr.GetXMitList()).First();

            using (var ts = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
            {
                var xx = await hr.Xmentes(
                    eszkoz,
                    null,
                    null,
                    DateTime.Now,
                    0,
                    null);

                Assert.AreEqual(HomeRepository.nincsXKitol, xx);
            }
        }
Пример #2
0
        public async Task AtadasTestMentes()
        {
            var dbb = new DbContextOptionsBuilder <RaktarContext>();

            dbb.UseSqlServer(connstrin);


            RaktarContext  rc = new RaktarContext(dbb.Options);
            HomeRepository hr = new HomeRepository(rc);

            var eszkoz    = (await hr.GetXMitList()).First();
            var kitol     = (await hr.GetXKitolList(eszkoz.ID)).First();
            var hova      = (await hr.GetXHovaList(kitol.ID)).First();
            var mennyiseg = kitol.Mennyiseg - 1;

            using (var ts = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
            {
                var xx = await hr.Xmentes(
                    eszkoz,
                    kitol,
                    hova,
                    DateTime.Now,
                    mennyiseg,
                    null);

                Assert.AreEqual(HomeRepository.sikeresFelvetel, xx);
            }
        }
Пример #3
0
 public AlkalmazottController(UserManager <Alkalmazott> userManager,
                              SignInManager <Alkalmazott> signInManager, RaktarContext context,
                              RoleManager <IdentityRole> roleManager)
 {
     userMgr   = userManager;
     signInMgr = signInManager;
     roleMgr   = roleManager;
     _context  = context;
 }
Пример #4
0
        public async Task TestMethod1()
        {
            var dbb = new DbContextOptionsBuilder <RaktarContext>();

            dbb.UseSqlServer(connstrin);


            RaktarContext  rc = new RaktarContext(dbb.Options);
            HomeRepository hr = new HomeRepository(rc);

            var xx = await hr.GetXMitList();
        }
Пример #5
0
        public async Task listBeszerzesTest()
        {
            var dbb = new DbContextOptionsBuilder <RaktarContext>();

            dbb.UseSqlServer(connstrin);


            RaktarContext  rc = new RaktarContext(dbb.Options);
            HomeRepository hr = new HomeRepository(rc);

            var xx = await hr.ListBeszerzesek(null, 100, 1);

            Assert.IsNotNull(xx);
            Assert.IsTrue(xx.Total > 0);
            Assert.IsTrue(xx.Data.Count() > 0);
            Assert.IsTrue(xx.Data[0].Mennyiseg > 0);
        }
Пример #6
0
 public TermekTipusController(RaktarContext context)
 {
     _context = context;
 }
Пример #7
0
 public RaktarsController(RaktarContext context)
 {
     _context = context;
 }
Пример #8
0
 public TermeksController(RaktarContext context, UserManager <Alkalmazott> userManager)
 {
     _context = context;
     userMgr  = userManager;
 }
Пример #9
0
 public LogController(RaktarContext context)
 {
     _context = context;
 }