Ejemplo n.º 1
0
        public static IntervalStatus CreateNew(int depth = 0)
        {
            rt.fias.model.fias.IntervalStatus entity = new rt.fias.model.fias.IntervalStatus();


            entity.Name = "Test Test Test Test Test Test Test Test Test Test Test ";

            return(entity);
        }
Ejemplo n.º 2
0
        public void Create()
        {
            try
            {
                rt.fias.model.fias.IntervalStatus entity = CreateNew();

                object result = manager.Save(entity);

                Assert.IsNotNull(result);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.ToString());
            }
        }
Ejemplo n.º 3
0
        public void Read()
        {
            try
            {
                rt.fias.model.fias.IntervalStatus entityA = CreateNew();
                manager.Save(entityA);

                rt.fias.model.fias.IntervalStatus entityB = manager.GetById(entityA.Id);

                Assert.AreEqual(entityA, entityB);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.ToString());
            }
        }
Ejemplo n.º 4
0
        public void Delete()
        {
            try
            {
                rt.fias.model.fias.IntervalStatus entityC = CreateNew();
                manager.Save(entityC);
                manager.Session.GetISession().Flush();
                manager.Session.GetISession().Clear();

                rt.fias.model.fias.IntervalStatus entity = GetFirstIntervalStatus();

                manager.Delete(entity);

                entity = manager.GetById(entity.Id);
                Assert.IsNull(entity);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.ToString());
            }
        }
Ejemplo n.º 5
0
        public void Update()
        {
            try
            {
                rt.fias.model.fias.IntervalStatus entityC = CreateNew();
                manager.Save(entityC);
                manager.Session.GetISession().Flush();
                manager.Session.GetISession().Clear();

                rt.fias.model.fias.IntervalStatus entityA = GetFirstIntervalStatus();

                entityA.Name = "Test Test Test Test Test Test Test Test";

                manager.Update(entityA);

                rt.fias.model.fias.IntervalStatus entityB = manager.GetById(entityA.Id);

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