예제 #1
0
        public static void ClassInitialize(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext)
        {
            const string Schema =
                "<Schema><AccessGroup name=\"default\" blksz=\"1024\">" +
                "<ColumnFamily><Name>a</Name></ColumnFamily>" +
                "<ColumnFamily><Name>b</Name></ColumnFamily>" +
                "<ColumnFamily><Name>c</Name></ColumnFamily>" +
                "</AccessGroup></Schema>";

            tableA = EnsureTable(typeof(TestMultipleInstances), Schema);

            var properties = new Dictionary <string, object> {
                { "Uri", UriB }
            };

            contextB = Hypertable.Context.Create(ConnectionString, properties);
            clientB  = contextB.CreateClient();
            nsB      = clientB.OpenNamespace(NsName, OpenDispositions.OpenAlways);
            nsB.DropTable(typeof(TestMultipleInstances).Name, DropDispositions.IfExists);
            nsB.CreateTable(typeof(TestMultipleInstances).Name, Schema);
            tableB = nsB.OpenTable(typeof(TestMultipleInstances).Name);
        }
예제 #2
0
        public static void ClassInitialize(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext)
        {
            const string Schema =
                "<Schema><AccessGroup name=\"default\" blksz=\"1024\">" +
                "<ColumnFamily><Name>a</Name></ColumnFamily>" +
                "<ColumnFamily><Name>b</Name></ColumnFamily>" +
                "<ColumnFamily><Name>c</Name></ColumnFamily>" +
                "</AccessGroup></Schema>";

            tableA = EnsureTable(typeof(TestMultipleInstances), Schema);

            var properties = new Dictionary<string, object> { { "Uri", UriB } };

            contextB = Hypertable.Context.Create(ConnectionString, properties);
            clientB = contextB.CreateClient();
            nsB = clientB.OpenNamespace(NsName, OpenDispositions.OpenAlways);
            nsB.DropTable(typeof(TestMultipleInstances).Name, DropDispositions.IfExists);
            nsB.CreateTable(typeof(TestMultipleInstances).Name, Schema);
            tableB = nsB.OpenTable(typeof(TestMultipleInstances).Name);
        }