Beispiel #1
0
        public override void SetUp()
        {
            base.SetUp();

            _standardScriptGenerator = new ScriptGenerator(
                pd => pd.Factory.CreateSchemaScriptBuilder(pd),
                new RdbmsStorageEntityDefinitionProvider(),
                new ScriptToStringConverter());

            _extendedScriptGenerator = new ScriptGenerator(
                pd => new SqlDatabaseSelectionScriptElementBuilder(
                    new CompositeScriptBuilder(
                        SchemaGenerationThirdStorageProviderDefinition,
                        new IScriptBuilder[]
            {
                CreateTableBuilder(),
                CreateConstraintBuilder(),
                CreateExtendedViewBuilder(),
                CreateIndexBuilder(),
                CreateSynonymBuilder()
            }),
                    SchemaGenerationThirdStorageProviderDefinition.ConnectionString),
                new RdbmsStorageExtendedEntityDefinitionProvider(),
                new ScriptToStringConverter());

            _firstStorageProviderSetupDBScript    = ResourceUtility.GetResourceString(GetType(), "TestData.SetupDB_FirstStorageProvider.sql");
            _firstStorageProviderTearDownDBScript = ResourceUtility.GetResourceString(GetType(), "TestData.TearDownDB_FirstStorageProvider.sql");

            _secondStorageProviderSetupDBScript    = ResourceUtility.GetResourceString(GetType(), "TestData.SetupDB_SecondStorageProvider.sql");
            _secondStorageProviderTearDownDBScript = ResourceUtility.GetResourceString(GetType(), "TestData.TearDownDB_SecondStorageProvider.sql");

            _thirdStorageProviderSetupDBScript    = ResourceUtility.GetResourceString(GetType(), "TestData.SetupDB_ThirdStorageProvider.sql");
            _thirdStorageProviderTearDownDBScript = ResourceUtility.GetResourceString(GetType(), "TestData.TearDownDB_ThirdStorageProvider.sql");
        }
Beispiel #2
0
        public void GetResourceString()
        {
            var resourceContent = ResourceUtility.GetResourceString(Assembly.GetExecutingAssembly(),
                                                                    "Remotion.Development.UnitTests.Core.UnitTesting.Resources.TestEmbeddedResource.txt");

            Assert.That(resourceContent, Is.EqualTo("Testcontent"));
        }
        public override void TestFixtureSetUp()
        {
            base.TestFixtureSetUp();

            var createDBScript = ResourceUtility.GetResourceString(GetType(), "TestData.SchemaGeneration_CreateDB.sql");

            var masterAgent = new DatabaseAgent(MasterConnectionString);

            masterAgent.ExecuteBatchString(createDBScript, false, DatabaseConfiguration.GetReplacementDictionary());
        }
Beispiel #4
0
        public void GetResourceString_WithType()
        {
            var resourceContent = ResourceUtility.GetResourceString(GetType(), "TestEmbeddedResource.txt");

            Assert.That(resourceContent, Is.EqualTo("Testcontent"));
        }