コード例 #1
0
        public void Create()
        {
            try
            {
                rt.atl.model.atl.Uechiststatus entity = CreateNew();

                object result = manager.Save(entity);

                Assert.IsNotNull(result);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.ToString());
            }
        }
コード例 #2
0
        public void Read()
        {
            try
            {
                rt.atl.model.atl.Uechiststatus entityA = CreateNew();
                manager.Save(entityA);

                rt.atl.model.atl.Uechiststatus entityB = manager.GetById(entityA.Id);

                Assert.AreEqual(entityA, entityB);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.ToString());
            }
        }
コード例 #3
0
        public static Uechiststatus CreateNew(int depth = 0)
        {
            rt.atl.model.atl.Uechiststatus entity = new rt.atl.model.atl.Uechiststatus();


            entity.Dt        = System.DateTime.Now;
            entity.Uecstatus = null;
            entity.Ufile     = null;

            using (rt.atl.business.manager.IUecManager uecManager = ObjectFactory.GetInstance <IUecManager>())
            {
                entity.UEC = null;
            }

            return(entity);
        }
コード例 #4
0
        public void Delete()
        {
            try
            {
                rt.atl.model.atl.Uechiststatus entityC = CreateNew();
                manager.Save(entityC);
                manager.Session.GetISession().Flush();
                manager.Session.GetISession().Clear();

                rt.atl.model.atl.Uechiststatus entity = GetFirstUechiststatus();

                manager.Delete(entity);

                entity = manager.GetById(entity.Id);
                Assert.IsNull(entity);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.ToString());
            }
        }
コード例 #5
0
        public void Update()
        {
            try
            {
                rt.atl.model.atl.Uechiststatus entityC = CreateNew();
                manager.Save(entityC);
                manager.Session.GetISession().Flush();
                manager.Session.GetISession().Clear();

                rt.atl.model.atl.Uechiststatus entityA = GetFirstUechiststatus();

                entityA.Dt = System.DateTime.Now;

                manager.Update(entityA);

                rt.atl.model.atl.Uechiststatus entityB = manager.GetById(entityA.Id);

                Assert.AreEqual(entityA.Dt, entityB.Dt);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.ToString());
            }
        }