Beispiel #1
0
        public void Execute_TestFixtureSetup()
        {
            //Setup for testing
            //Setup for testing
            TestHelper helper = new TestHelper();

            servicesManager = helper.GetServicesManager();

            // implement_IHelper
            //create client
            _client        = helper.GetServicesManager().GetProxy <IRSAPIClient>(ConfigurationHelper.ADMIN_USERNAME, ConfigurationHelper.DEFAULT_PASSWORD);
            _eddsDbContext = helper.GetDBContext(-1);

            //Create workspace
            _workspaceId = CreateWorkspace.CreateWorkspaceAsync(_workspaceName, ConfigurationHelper.TEST_WORKSPACE_TEMPLATE_NAME, servicesManager, ConfigurationHelper.ADMIN_USERNAME, ConfigurationHelper.DEFAULT_PASSWORD).Result;
            dbContext    = helper.GetDBContext(_workspaceId);
            _client.APIOptions.WorkspaceID = _workspaceId;

            _rootFolderArtifactId = APIHelpers.GetRootFolderArtifactID(_client, _workspaceName);

            //Import Application containing script, fields, and choices
            Relativity.Test.Helpers.Application.ApplicationHelpers.ImportApplication(_client, _workspaceId, true, FilepathData);

            //Import custodians
            var custodians = GetCustodiansDatatable();

            var identityFieldArtifactId = GetArtifactIDOfCustodianField("Full Name", _workspaceId, _client);

            ImportAPIHelpers.ImportObjects(_workspaceId, "Custodian", identityFieldArtifactId, custodians, String.Empty);

            //Import Documents
            var documents = GetDocumentDataTable(_rootFolderArtifactId, _workspaceId);

            ImportAPIHelpers.CreateDocuments(_workspaceId, _rootFolderArtifactId, documents);
        }