Example #1
0
        public void SetNotExistColumnToUnique()
        {
            var exception = Assert.Throws <SpiderException>(() =>
            {
                var entityMetadata    = EntitySpider.ParseEntityMetaData(typeof(Entity3).GetTypeInfo());
                TestPipeline pipeline = new TestPipeline();
                pipeline.InitiEntity(entityMetadata);
            });

            Assert.Equal("Columns set as unique is not a property of your entity.", exception.Message);
        }
Example #2
0
 public void SetNotExistColumnToUnique()
 {
     try
     {
         var          entityMetadata = EntityDefine.Parse <Entity3>();
         TestPipeline pipeline       = new TestPipeline("");
         pipeline.AddEntity(entityMetadata);
         throw new Exception("Test failed");
     }
     catch (SpiderException exception)
     {
         Assert.Equal("Columns set as unique is not a property of your entity.", exception.Message);
     }
 }
Example #3
0
 public void SetNotExistColumnToIndex()
 {
     try
     {
         var          entityMetadata = EntitySpider.GenerateEntityDefine(typeof(Entity2).GetTypeInfo());
         TestPipeline pipeline       = new TestPipeline("");
         pipeline.AddEntity(entityMetadata);
         throw new Exception("Test failed");
     }
     catch (SpiderException exception)
     {
         Assert.Equal("Columns set as index is not a property of your entity.", exception.Message);
     }
 }
Example #4
0
 public void SetNotExistColumnToUnique()
 {
     try
     {
         var          entityMetadata = EntitySpider.GenerateEntityMetaData(typeof(Entity3).GetTypeInfo());
         TestPipeline pipeline       = new TestPipeline();
         pipeline.InitEntity(entityMetadata);
         throw new Exception("Test failed");
     }
     catch (SpiderException exception)
     {
         Assert.AreEqual("Columns set as unique is not a property of your entity.", exception.Message);
     }
 }
        public void SetNotExistColumnToIndex()
        {
            try
            {
                var entityMetadata = new EntityDefine <Entity2>();

                TestPipeline pipeline = new TestPipeline("");
                pipeline.AddEntity(entityMetadata);
                throw new Exception("Test failed");
            }
            catch (SpiderException exception)
            {
                Assert.Equal("Columns set as index are not a property of your entity", exception.Message);
            }
        }