Beispiel #1
0
        internal TeamCityServer(
            string serverUrl,
            string serverUrlBase,
            ITeamCityService service,
            ILogger logger)
        {
            if (String.IsNullOrWhiteSpace(serverUrl))
            {
                throw new ArgumentNullException(nameof(serverUrl));
            }

            this.ServerUrl = serverUrl;

            if (String.IsNullOrWhiteSpace(serverUrlBase))
            {
                this.ServerUrlBase = string.Empty;
            }
            else
            {
                this.ServerUrlBase = serverUrlBase;
            }

            this.Service = service ?? throw new ArgumentNullException(nameof(service));
            this.Logger  = logger ?? NullLogger.Instance;
        }
Beispiel #2
0
 public Paged(
     TeamCityServer instance,
     Func <Task <TTeamCityDto> > getFirst,
     Func <TTeamCityDto, Task <Page <TTeamCityEntity> > > convertToPage)
 {
     this._instance      = instance;
     this._service       = instance.Service;
     this._getFirst      = getFirst;
     this._convertToPage = convertToPage;
 }
Beispiel #3
0
 public void Arrange()
 {
     _sucessBuildId   = "827572";
     _teamCityService = Substitute.For <ITeamCityService>();
     _teamCityService.GetBuildStatus(_sucessBuildId).Returns("SUCCESS");
     _testEnvironmentService        = Substitute.For <ITestEnvironmentService>();
     _buildStatusDataStorageService = Substitute.For <IBuildStatusDataStorageService>();
     _updateBuildStatusController   = new UpdateBuildStatusController(_teamCityService, _testEnvironmentService, _buildStatusDataStorageService);
     SetupController(HttpMethod.Post);
 }
Beispiel #4
0
        public ProjectDetails()
        {
            _teamCityService    = DependencyService.Get <ITeamCityService>();
            BuildTypeCollection = new ObservableCollection <BuildType>();

            InitializeComponent();

            // TODO: This is synchronous loading. Not good. Refactor to make it asynchronous
            LoadProjectBuildTypes();
        }
Beispiel #5
0
        public Projects()
        {
            ProjectsCollection = new ObservableCollection <Project>();
            InitializeComponent();
            _teamCityService = DependencyService.Get <ITeamCityService>();

            ProjectsList.ItemsSource   = ProjectsCollection;
            ProjectsList.ItemSelected += ProjectsList_ItemSelected;
            Filter.TextChanged        += Filter_TextChanged;

            // TODO: This is synchronous loading. Not good. Refactor to make it asynchronous
            RefreshProjectList();
        }
Beispiel #6
0
 public BuildsController(ITeamCityService teamCityService)
 {
     _teamCityService = teamCityService;
 }
Beispiel #7
0
 public BuildService(ITeamCityService teamCityService)
 {
     _teamCityService = teamCityService;
 }
Beispiel #8
0
 public BuildTypeService(ITeamCityService teamCityService, IBuildService buildService)
 {
     _teamCityService = teamCityService;
     _buildService = buildService;
 }
Beispiel #9
0
 public TeamCityPoller()
 {
     // TODO: Fix Dependecy Injection on these services.
     _tcService   = new TeamCityService();
     _nodeService = new NodeService();
 }
Beispiel #10
0
 public UpdateBuildStatusController(ITeamCityService teamCityService, ITestEnvironmentService testEnvironmentService, IBuildStatusDataStorageService buildStatusDataStorageService)
 {
     _teamCityService               = teamCityService;
     _testEnvironmentService        = testEnvironmentService;
     _buildStatusDataStorageService = buildStatusDataStorageService;
 }
 public TeamCityController(ITeamCityService teamCityService, IBuildMapper buildMapper, ISettingsService settingsService)
 {
     _teamCityService = teamCityService;
     _buildMapper     = buildMapper;
     _settingsService = settingsService;
 }
 internal CETeamCityService(string user, string password)
 {
     _service = new TeamCityService(user, password);
 }