Exemple #1
0
 public void SetUp()
 {
     _clientMock = TestHelper.SetUpMockClient();
     _fakeTool   = new BuildDefinitionTool(
         _clientMock.Object,
         TestHelper.RealOrganization,
         TestHelper.RealProject,
         TestHelper.RealProjectId);
 }
Exemple #2
0
        private static Commands SetUpCommands()
        {
            var pat = ToolHelper.GetPersonalAccessToken();

            var client = new Client(pat);

            var projectTool = new ProjectTool(
                client,
                AppSettings.AzureDevOpsOrganization,
                AppSettings.AzureDevOpsProject
                );

            var projectId = (Guid)projectTool.GetId(AppSettings.AzureDevOpsProject).Result;

            var buildTool = new BuildDefinitionTool(
                client,
                AppSettings.AzureDevOpsOrganization,
                AppSettings.AzureDevOpsProject,
                projectId
                );

            var releaseTool = new ReleaseDefinitionTool(
                client,
                AppSettings.AzureDevOpsOrganization,
                AppSettings.AzureDevOpsProject
                );

            var repositoryTool = new RepositoryTool(
                client,
                AppSettings.AzureDevOpsOrganization,
                AppSettings.AzureDevOpsProject,
                projectId
                );

            var taskTool = new TaskGroupTool(
                client,
                AppSettings.AzureDevOpsOrganization,
                AppSettings.AzureDevOpsProject
                );

            var variableGroupTool = new VariableGroupTool(
                client,
                AppSettings.AzureDevOpsOrganization,
                AppSettings.AzureDevOpsProject
                );

            var commands = new Commands(
                buildTool,
                releaseTool,
                projectTool,
                repositoryTool,
                taskTool,
                variableGroupTool);

            return(commands);
        }
Exemple #3
0
        public void Constructor_Succeeds()
        {
            var result =
                new BuildDefinitionTool(
                    _clientMock.Object,
                    TestHelper.RealOrganization,
                    TestHelper.RealProject,
                    TestHelper.RealProjectId
                    );

            Assert.That(result, Is.Not.Null);
        }