示例#1
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);
     }
 }
示例#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);
     }
 }
        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);
            }
        }