Example #1
0
        public void TestIsOwnedByConnectedUser()
        {
            IWorkspace workspace = WorkspaceUtils.OpenSDEWorkspace(
                "PROSUITE_DDX", DirectConnectDriver.SqlServer, @".\SQLEXPRESS");

            var domain = new CodedValueDomainClass
            {
                Name      = "Test",
                FieldType = esriFieldType.esriFieldTypeInteger,
                Owner     = "DBO"
            };

            Assert.True(DomainUtils.IsOwnedByConnectedUser(domain, workspace));

            workspace    = WorkspaceUtils.OpenPgdbWorkspace(_simpleGdbPath);
            domain.Owner = string.Empty;             // or null

            Assert.True(DomainUtils.IsOwnedByConnectedUser(domain, workspace));
        }