Пример #1
0
        public void GetResourceTest()
        {
            NHibernateResourceManager target = new NHibernateResourceManager();
            var actual = target.GetResource(null);

            Assert.Fail("it shoudl throw a eception.");
        }
Пример #2
0
        public void Add_Test_Operator_IsNull()
        {
            NHibernateResourceManager target = new NHibernateResourceManager();

            target.Add(typeof(User), null);
            Assert.Fail("it shoudl throw a eception.");
        }
Пример #3
0
        public void Add_Test_Resources_IsNull()
        {
            NHibernateResourceManager target = new NHibernateResourceManager();

            target.Add(null, typeof(aOperator));
            Assert.Fail("it shoudl throw a eception.");
        }
Пример #4
0
        public void NormalSetAndGet()
        {
            NHibernateResourceManager target = new NHibernateResourceManager();
            Type resourceInstance            = typeof(User);
            Type enumType = typeof(aOperator);

            var actual = target.Add(resourceInstance, enumType);

            Assert.AreEqual(target, actual);
            var operatType = actual.GetOperatorType(resourceInstance);

            Assert.AreEqual(enumType, operatType);
            var res = actual.GetResource(enumType);

            Assert.AreEqual(res, resourceInstance);

            var resources = target.Resources;

            Assert.AreEqual(1, resources.Length);
        }
Пример #5
0
 public void NHibernateResourceOperatorConstructorTest()
 {
     NHibernateResourceManager target = new NHibernateResourceManager();
 }
Пример #6
0
 public void GetOperatorType_Cannot_find_exception()
 {
     NHibernateResourceManager target = new NHibernateResourceManager();
     var actual = target.GetOperatorType(typeof(User));
 }
 public void GetResourceTest()
 {
     NHibernateResourceManager target = new NHibernateResourceManager();
     var actual = target.GetResource(null);
     Assert.Fail("it shoudl throw a eception.");
 }
 public void GetOperatorType_Cannot_find_exception()
 {
     NHibernateResourceManager target = new NHibernateResourceManager();
     var actual = target.GetOperatorType(typeof(User));
 }
 public void Add_Test_Resources_IsNull()
 {
     NHibernateResourceManager target = new NHibernateResourceManager();
     target.Add(null, typeof(aOperator));
     Assert.Fail("it shoudl throw a eception.");
 }
 public void Add_Test_Operator_IsNull()
 {
     NHibernateResourceManager target = new NHibernateResourceManager();
     target.Add(typeof(User), null);
     Assert.Fail("it shoudl throw a eception.");
 }
        public void NormalSetAndGet()
        {
            NHibernateResourceManager target = new NHibernateResourceManager();
            Type resourceInstance = typeof(User);
            Type enumType = typeof(aOperator);

            var actual = target.Add(resourceInstance, enumType);
            Assert.AreEqual(target, actual);
            var operatType = actual.GetOperatorType(resourceInstance);
            Assert.AreEqual(enumType, operatType);
            var res = actual.GetResource(enumType);
            Assert.AreEqual(res, resourceInstance);

            var resources = target.Resources;
            Assert.AreEqual(1, resources.Length);
        }
 public void NHibernateResourceOperatorConstructorTest()
 {
     NHibernateResourceManager target = new NHibernateResourceManager();
 }