Exemple #1
0
        public void GenerateDeclarations()
        {
            var Mappings = new MappingSource(new IMapping[] {
                new BaseClass1Mapping(),
                new ConcreteClass1Mapping(),
                new ConcreteClass2Mapping(),
                new ConcreteClass3Mapping(),
                new IInterface1Mapping(),
                new IInterface2Mapping()
            },
                                             new MockDatabaseMapping(),
                                             new QueryProviderManager(new[] { new SQLServerQueryProvider(Configuration, ObjectPool) }, Logger),
                                             Canister.Builder.Bootstrapper.Resolve <ILogger>(),
                                             ObjectPool);
            var TestObject = new UpdateQuery <ConcreteClass1>(Mappings, ObjectPool);
            var Result     = TestObject.GenerateDeclarations();

            Assert.Equal(CommandType.Text, Result[0].DatabaseCommandType);
            Assert.Empty(Result[0].Parameters);
            Assert.Equal("", Result[0].QueryString);
            Assert.Equal(QueryType.Update, Result[0].QueryType);
        }