Пример #1
0
        public void GetBuildConfigurationTemplate_ById()
        {
            // Arrange
            var teamCityCaller = CreateTeamCityCaller();

            A.CallTo(
                () =>
                teamCityCaller.Get <BuildConfiguration>("/app/rest/buildTypes/id:TemplateId"))
            .Returns(new BuildConfiguration {
                Id = "TemplateId"
            });

            var connectedTc = new RemoteTc().Connect(_ => _.AsGuest(), teamCityCaller);

            // Act
            connectedTc.GetBuildConfigurationTemplate(_ => _.Id("TemplateId"));

            // Assert
            A.CallTo(() => teamCityCaller.Get <BuildConfiguration>(@"/app/rest/buildTypes/id:TemplateId")).MustHaveHappened();
        }
Пример #2
0
        public void GetBuildConfigurationTemplate_ById()
        {
            // Arrange
            var teamCityCaller = CreateTeamCityCaller();
            A.CallTo(
                () =>
                    teamCityCaller.Get<BuildConfiguration>("/app/rest/buildTypes/id:TemplateId"))
                .Returns(new BuildConfiguration { Id = "TemplateId" });

            var connectedTc = new RemoteTc().Connect(_ => _.AsGuest(), teamCityCaller);

            // Act
            connectedTc.GetBuildConfigurationTemplate(_ => _.Id("TemplateId"));

            // Assert
            A.CallTo(() => teamCityCaller.Get<BuildConfiguration>(@"/app/rest/buildTypes/id:TemplateId")).MustHaveHappened();
        }