コード例 #1
0
ファイル: BaseItemTest.cs プロジェクト: Waltervondehans/NBi
        public void GetConnectionString_NoInitialRoleAndNoAdditionalRoleProvided_NoRoleAtTheEnd()
        {
            var item = new BaseItemTestable();
            item.ConnectionString = @"Provider=MSOLAP.4;Data Source=(local)\SQL2012;Initial Catalog='Adventure Works DW 2012';";

            var connString = item.GetConnectionString();

            Assert.That(connString, Is.Not.StringContaining("role"));
        }
コード例 #2
0
        public void GetConnectionString_NoInitialRoleAndNoAdditionalRoleProvided_NoRoleAtTheEnd()
        {
            var item = new BaseItemTestable();

            item.ConnectionString = @"Provider=MSOLAP.4;Data Source=(local)\SQL2012;Initial Catalog='Adventure Works DW 2012';";

            var connString = item.GetConnectionString();

            Assert.That(connString, Is.Not.StringContaining("role"));
        }
コード例 #3
0
ファイル: BaseItemTest.cs プロジェクト: Waltervondehans/NBi
        public void GetConnectionString_NoInitialRoleAndTwoAdditionalRolesProvided_TwoRolesAtTheEnd()
        {
            var item = new BaseItemTestable();
            item.ConnectionString = @"Provider=MSOLAP.4;Data Source=(local)\SQL2012;Initial Catalog='Adventure Works DW 2012';";
            item.Roles = "PowerUser;LimitedAccess";

            var connString = item.GetConnectionString();

            Assert.That(connString, Is.StringMatching(".*Roles.*=.*\"PowerUser;LimitedAccess\".*"));
        }
コード例 #4
0
        public void GetConnectionString_NoInitialRoleAndTwoAdditionalRolesProvided_TwoRolesAtTheEnd()
        {
            var item = new BaseItemTestable();

            item.ConnectionString = @"Provider=MSOLAP.4;Data Source=(local)\SQL2012;Initial Catalog='Adventure Works DW 2012';";
            item.Roles            = "PowerUser;LimitedAccess";

            var connString = item.GetConnectionString();

            Assert.That(connString, Is.StringMatching(".*Roles.*=.*\"PowerUser;LimitedAccess\".*"));
        }
コード例 #5
0
ファイル: BaseItemTest.cs プロジェクト: Waltervondehans/NBi
        public void GetConnectionString_OneInitialRoleAndOneAdditionalRoleProvided_OneRoleAtTheEnd()
        {
            var item = new BaseItemTestable();
            item.ConnectionString = @"Provider=MSOLAP.4;Data Source=(local)\SQL2012;Initial Catalog='Adventure Works DW 2012';";
            item.ConnectionString += "Roles=\"Admin\"";
            item.Roles = "PowerUser";

            var connString = item.GetConnectionString();

            Assert.That(connString, Is.StringMatching(".*Roles.*=.*\"PowerUser\".*"));
            Assert.That(connString, Is.Not.StringMatching("Admin"));
        }
コード例 #6
0
        public void GetConnectionString_OneInitialRoleAndOneAdditionalRoleProvided_OneRoleAtTheEnd()
        {
            var item = new BaseItemTestable();

            item.ConnectionString  = @"Provider=MSOLAP.4;Data Source=(local)\SQL2012;Initial Catalog='Adventure Works DW 2012';";
            item.ConnectionString += "Roles=\"Admin\"";
            item.Roles             = "PowerUser";

            var connString = item.GetConnectionString();

            Assert.That(connString, Is.StringMatching(".*Roles.*=.*\"PowerUser\".*"));
            Assert.That(connString, Is.Not.StringMatching("Admin"));
        }