├── .github
├── ISSUE_TEMPLATE.md
└── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── .nuget
├── NuGet.Config
├── NuGet.exe
└── NuGet.targets
├── .travis.yml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── CONTRIBUTORS.md
├── FluentTc.Samples
├── App.config
├── FluentTc.Samples.csproj
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
└── packages.config
├── FluentTc.Tests
├── AcceptanceTests.cs
├── AgentsRetrieverTests.cs
├── BootstrapperTests.cs
├── BuildsRetrieverTests.cs
├── ConnectedTcTests.cs
├── Domain
│ └── BuildTests.cs
├── Engine
│ ├── BuildConfigurationRetrieverTests.cs
│ ├── BuildConfigurationTemplateRetrieverTests.cs
│ ├── BuildModelToBuildConverterTests.cs
│ ├── BuildParametersTests.cs
│ ├── BuildQueueRemoverTests.cs
│ ├── BuildStatisticConverterTests.cs
│ ├── BuildStatisticsRetrieverTests.cs
│ ├── ChangedFilesParserTests.cs
│ ├── ChangesRetrieverTests.cs
│ ├── ModelFiltersTest.cs
│ ├── NewProjectDetailsBuilderTests.cs
│ ├── ProjectsRetrieverTests.cs
│ ├── PropertiesFileParserTests.cs
│ └── UniversalTypeConverterTests.cs
├── Extensions
│ └── StringExtensionsTests.cs
├── FluentTc.Tests.csproj
├── LocalTcTests.cs
├── Locators
│ ├── AgentHavingBuilderTests.cs
│ ├── Auto.cs
│ ├── BranchHavingBuilderFactoryTests.cs
│ ├── BranchHavingBuilderTests.cs
│ ├── BuildAdditionalIncludeBuilderTests.cs
│ ├── BuildConfigurationHavingBuilderTests.cs
│ ├── BuildHavingBuilderTests.cs
│ ├── BuildIncludeBuilderTests.cs
│ ├── BuildParameterTypeBuilderFormatTests.cs
│ ├── BuildProjectHavingBuilderTests.cs
│ ├── BuildQueueIdHavingBuilderTests.cs
│ ├── ChangesHavingBuilderTests.cs
│ ├── ChangesIncludeBuilderTests.cs
│ ├── CountBuilderTests.cs
│ ├── GitVCSRootBuilderTests.cs
│ ├── QueueHavingBuilderTests.cs
│ ├── TeamCityConfigurationBuilderTests.cs
│ ├── UserHavingBuilderTests.cs
│ └── VCSRootEntryBuilderTests.cs
├── Properties
│ └── AssemblyInfo.cs
├── RemoteTcTests.cs
├── Resources
│ └── PropertiesFile.txt
├── TestingTools
│ └── EmbeddedResourceReader.cs
├── app.config
└── packages.config
├── FluentTc.ndproj
├── FluentTc.sln
├── FluentTc.sln.DotSettings
├── FluentTc
├── Bootstrapper.cs
├── ConnectedTc.cs
├── Domain
│ ├── Agent.cs
│ ├── AgentPool.cs
│ ├── AgentRequirement.cs
│ ├── AgentRequirements.cs
│ ├── AgentWrapper.cs
│ ├── ArtifactDependencies.cs
│ ├── ArtifactDependency.cs
│ ├── Assignment.cs
│ ├── Build.cs
│ ├── BuildConfiguration.cs
│ ├── BuildModel.cs
│ ├── BuildStatisticsModel.cs
│ ├── BuildStep.cs
│ ├── BuildSteps.cs
│ ├── BuildTrigger.cs
│ ├── BuildTriggers.cs
│ ├── BuildTypeWrapper.cs
│ ├── BuildWrapper.cs
│ ├── Change.cs
│ ├── ChangedFile.cs
│ ├── ChangesList.cs
│ ├── ChangesWrapper.cs
│ ├── File.cs
│ ├── FileWrapper.cs
│ ├── Group.cs
│ ├── IBuildStatistic.cs
│ ├── Investigation.cs
│ ├── InvestigationWrapper.cs
│ ├── Parameters.cs
│ ├── Project.cs
│ ├── ProjectWrapper.cs
│ ├── Properties.cs
│ ├── Property.cs
│ ├── PropertyType.cs
│ ├── ResolutionWrapper.cs
│ ├── RevisionsList.cs
│ ├── RevisionsWrapper.cs
│ ├── Role.cs
│ ├── RoleWrapper.cs
│ ├── SnapshotDependencies.cs
│ ├── SnapshotDependency.cs
│ ├── SourceBuildType.cs
│ ├── Test.cs
│ ├── TestOccurrence.cs
│ ├── TestOccurrenceWrapper.cs
│ ├── TestOccurrences.cs
│ ├── User.cs
│ ├── UserGroupWrapper.cs
│ ├── UserWrapper.cs
│ ├── VcsRoot.cs
│ ├── VcsRootEntries.cs
│ └── VcsRootEntry.cs
├── Engine
│ ├── AgentEnabler.cs
│ ├── AgentHavingBuilderFactory.cs
│ ├── AgentsRetriever.cs
│ ├── ArtifactsDownloader.cs
│ ├── BuildConfigurationCreator.cs
│ ├── BuildConfigurationRetriever.cs
│ ├── BuildConfigurationRunner.cs
│ ├── BuildConfigurationTemplateRetriever.cs
│ ├── BuildIncludeBuilderFactory.cs
│ ├── BuildModelToBuildConverter.cs
│ ├── BuildParameters.cs
│ ├── BuildQueueIdHavingBuilderFactory.cs
│ ├── BuildQueueRemover.cs
│ ├── BuildStatisticConverter.cs
│ ├── BuildStatisticsRetriever.cs
│ ├── BuildTemplateAttacher.cs
│ ├── BuildsRetriever.cs
│ ├── ChangedFilesParser.cs
│ ├── ChangesRetriever.cs
│ ├── CountBuilderFactory.cs
│ ├── HttpClientWrapper.cs
│ ├── HttpClientWrapperFactory.cs
│ ├── IBuildParameterHavingBuilder.cs
│ ├── NewProjectDetailsBuilder.cs
│ ├── ProjectCreator.cs
│ ├── ProjectPropertySetter.cs
│ ├── ProjectsRetriever.cs
│ ├── PropertiesFileParser.cs
│ ├── QueueHavingBuilderFactory.cs
│ ├── TeamCityBuildPropertiesFileRetriever.cs
│ ├── TeamCityCaller.cs
│ ├── TeamCityDateFilter.cs
│ ├── TeamCityWriterFactory.cs
│ ├── TeamcityJsonEncoderDecoderConfiguration.cs
│ ├── UniversalTypeConverter.cs
│ ├── UserRetriever.cs
│ ├── VCSRootAttacher.cs
│ ├── VCSRootCreator.cs
│ └── ZipExtractor.cs
├── Exceptions
│ ├── AgentNotFoundException.cs
│ ├── BuildConfigurationNotFoundException.cs
│ ├── BuildNotFoundException.cs
│ ├── MissingBuildParameterException.cs
│ ├── MoreThanOneAgentFoundException.cs
│ ├── MoreThanOneBuildConfigurationFoundException.cs
│ └── MoreThanOneBuildFoundException.cs
├── Extensions
│ └── StringExtensions.cs
├── FluentTc.csproj
├── FluentTc.nuspec
├── InvestigationRetriever.cs
├── LocalTc.cs
├── Locators
│ ├── AgentHavingBuilder.cs
│ ├── BranchHavingBuilder.cs
│ ├── BranchHavingBuilderFactory.cs
│ ├── BuildAdditionalIncludeBuilder.cs
│ ├── BuildConfigurationHavingBuilder.cs
│ ├── BuildConfigurationHavingBuilderFactory.cs
│ ├── BuildConfigurationTemplateHavingBuilder.cs
│ ├── BuildFieldValueBuilder.cs
│ ├── BuildHavingBuilder.cs
│ ├── BuildHavingBuilderFactory.cs
│ ├── BuildIncludeBuilder.cs
│ ├── BuildParameterCheckboxTypeBuilder.cs
│ ├── BuildParameterSelectListTypeBuilder.cs
│ ├── BuildParameterTextTypeBuilder.cs
│ ├── BuildParameterTypeBuilder.cs
│ ├── BuildParameterValueBuilder.cs
│ ├── BuildParametersBuilder.cs
│ ├── BuildProjectFieldValueBuilder.cs
│ ├── BuildProjectHavingBuilder.cs
│ ├── BuildProjectHavingBuilderFactory.cs
│ ├── BuildQueueIdHavingBuilder.cs
│ ├── BuildState.cs
│ ├── BuildStatus.cs
│ ├── ChangesHavingBuilder.cs
│ ├── ChangesIncludeBuilder.cs
│ ├── CountBuilder.cs
│ ├── GitVCSRootBuilder.cs
│ ├── LocatorBuilder.cs
│ ├── MoreOptionsHavingBuilder.cs
│ ├── OnChangeHavingBuilder.cs
│ ├── QueueHavingBuilder.cs
│ ├── TeamCityConfigurationBuilder.cs
│ ├── TeamCityConnectionDetails.cs
│ ├── UserHavingBuilder.cs
│ ├── UserHavingBuilderFactory.cs
│ └── VCSRootEntryBuilder.cs
├── Properties
│ └── AssemblyInfo.cs
├── RemoteTc.cs
└── packages.config
├── LICENSE
├── Quali-Shells-Open-Source.rtf
└── README.md
/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ### Bug/Feature Request
2 | _Remove the unnecessary and provide detailed description_
3 |
4 | ### Test to reproduce
5 | ```C#
6 | _Please provide necessary steps for reproduction of this issue_.
7 | [Test]
8 | public void Test_To_Reproduce_The_Issue()
9 | {
10 | }
11 | ```
12 |
13 | ### Affected versions
14 |
15 | Product | Version
16 | --------|--------
17 | FluentTc |
18 | TeamCity |
19 | Autofac |
20 | EasyHttp |
21 | SharpZipLib |
22 | System.IO.Abstractions |
23 | TeamCity.ServiceMessages |
24 |
25 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ### Issue details
2 |
3 | _Please provide issue details here_.
4 |
5 | ### Relates to issue
6 | _Use close #XX or connect #XX in order to resolve or link an issue_
7 |
8 | ### Checklist
9 | - [ ] All unit tests passed on build server
10 | - [ ] Acceptance test(s) covers new/modified functionality
11 | - [ ] Code coverage is at least the same or higher
12 | - [ ] Breaking change in public API
13 |
14 | # Example of using new/modified functionality
15 |
16 | ```C#
17 | // _Please provide necessary steps for reproduction of this issue_.
18 | [Test]
19 | public void Test_To_Reproduce_The_Issue()
20 | {
21 | }
22 | ```
23 |
--------------------------------------------------------------------------------
/.nuget/NuGet.Config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.nuget/NuGet.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QualiSystems/FluentTc/612532dd7d87bb00e3b965f013f7d18e1ad61677/.nuget/NuGet.exe
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: csharp
2 | solution: FluentTc.sln
3 |
4 | install:
5 | - sudo apt-get install -y gtk-sharp2
6 | - nuget restore FluentTc.sln
7 | - nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory testrunner
8 |
9 | script:
10 | - xbuild /p:Configuration=Release FluentTc.sln
11 | - mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe ./FluentTc.Tests/bin/Release/FluentTc.Tests.dll
12 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6 |
7 | ## Our Standards
8 |
9 | Examples of behavior that contributes to creating a positive environment include:
10 |
11 | * Using welcoming and inclusive language
12 | * Being respectful of differing viewpoints and experiences
13 | * Gracefully accepting constructive criticism
14 | * Focusing on what is best for the community
15 | * Showing empathy towards other community members
16 |
17 | Examples of unacceptable behavior by participants include:
18 |
19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances
20 | * Trolling, insulting/derogatory comments, and personal or political attacks
21 | * Public or private harassment
22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission
23 | * Other conduct which could reasonably be considered inappropriate in a professional setting
24 |
25 | ## Our Responsibilities
26 |
27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28 |
29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30 |
31 | ## Scope
32 |
33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34 |
35 | ## Enforcement
36 |
37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at borismod@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38 |
39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40 |
41 | ## Attribution
42 |
43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44 |
45 | [homepage]: http://contributor-covenant.org
46 | [version]: http://contributor-covenant.org/version/1/4/
47 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 | We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
3 |
4 | - Reporting a bug
5 | - Discussing the current state of the code
6 | - Submitting a fix
7 | - Proposing new features
8 | - Becoming a maintainer
9 |
10 | ## We Develop with Github
11 | We use github to host code, to track issues and feature requests, as well as accept pull requests.
12 |
13 | ## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests
14 | Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests:
15 |
16 | 1. Fork the repo and create your branch from `master`.
17 | 2. If you've added code that should be tested, add tests.
18 | 3. If you've changed APIs, update the documentation.
19 | 4. Ensure the test suite passes.
20 | 5. Make sure your code lints.
21 | 6. Issue that pull request!
22 |
23 | ## Any contributions you make will be under the MIT Software License
24 | In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.
25 |
26 | ## Report bugs using Github's [issues](https://github.com/QualiSystems/FluentTc/issues)
27 | We use GitHub issues to track public bugs. Report a bug by [opening a new issue](); it's that easy!
28 |
29 | ## Write bug reports with detail, background, and sample code
30 | [This is an example](http://stackoverflow.com/q/12488905/180626) of a bug report. Here's [another example from Craig Hockenberry](http://www.openradar.me/11905408), an app developer whom I greatly respect.
31 |
32 | **Great Bug Reports** tend to have:
33 |
34 | - A quick summary and/or background
35 | - Steps to reproduce
36 | - Be specific!
37 | - Give sample code if you can.
38 | - What you expected would happen
39 | - What actually happens
40 | - Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
41 |
42 | People *love* thorough bug reports. I'm not even kidding.
43 |
44 | ## Use a Consistent Coding Style
45 |
46 |
--------------------------------------------------------------------------------
/CONTRIBUTORS.md:
--------------------------------------------------------------------------------
1 | # Contributors
2 |
3 | in order of contribution
4 |
5 | * Boris Modylevsky [@borismod](https://github.com/borismod)
6 | * Tomer Cohen [@TCDooM](https://github.com/TCDooM)
7 | * Igor Olikh [@igoro1975](https://github.com/igoro1975)
8 | * Derrick Wood [@asmoran](https://github.com/asmoran)
9 | * sokolovsv90 [@sokolovsv90](https://github.com/sokolovsv90)
10 | * Tomer Admon [@TomerAdmon](https://github.com/TomerAdmon)
11 | * Artem Kuznetsov [@nex-54](https://github.com/nex-54)
12 | * Stephen Brown [@evolvedlight](https://github.com/evolvedlight)
13 | * Tomas Bezouska [@bezysoftware](http://github.com/bezysoftware)
14 | * Pat Hermens [@phermens-coolblue](https://github.com/phermens-coolblue)
15 | * Daniel Dreibrodt [@3breadt](https://github.com/3breadt)
16 | * Polzoni Gilberto [@GibbOne](https://github.com/GibbOne)
17 | * Jakub Bartkowiak [@gralin](https://github.com/gralin)
18 |
--------------------------------------------------------------------------------
/FluentTc.Samples/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/FluentTc.Samples/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("FluentTc.Samples")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("FluentTc.Samples")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("dff815ed-32f7-417a-9005-93f246291921")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/FluentTc.Samples/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/FluentTc.Tests/BootstrapperTests.cs:
--------------------------------------------------------------------------------
1 | using FakeItEasy;
2 | using FluentAssertions;
3 | using FluentTc.Locators;
4 | using NUnit.Framework;
5 |
6 | namespace FluentTc.Tests
7 | {
8 | [TestFixture]
9 | public class BootstrapperTests
10 | {
11 | [Test]
12 | public void GetConnectedTc_FakeConnection_NotNull()
13 | {
14 | // Arrange
15 | var bootstrapper = new Bootstrapper(A.Fake());
16 |
17 | // Act
18 | var connectedTc = bootstrapper.GetConnectedTc();
19 |
20 | // Assert
21 | connectedTc.Should().NotBeNull();
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/FluentTc.Tests/Domain/BuildTests.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using FluentAssertions;
4 | using FluentTc.Domain;
5 | using FluentTc.Locators;
6 | using NUnit.Framework;
7 |
8 | namespace FluentTc.Tests.Domain
9 | {
10 | [TestFixture]
11 | public class BuildTests
12 | {
13 | [Test]
14 | public void SetBuildConfiguration()
15 | {
16 | // Arrange
17 | var build = new Build(1, "2", BuildStatus.Success, new DateTime(), new DateTime(), new DateTime(), null,
18 | null,
19 | new List(), "",
20 | null, new TestOccurrences { Count = 0 }, BuildState.Finished);
21 |
22 | // Act
23 | build.SetBuildConfiguration(new BuildConfiguration {Id = "ConfigId"});
24 |
25 | // Assert
26 | build.BuildConfiguration.Id.Should().Be("ConfigId");
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/FluentTc.Tests/Engine/BuildConfigurationRetrieverTests.cs:
--------------------------------------------------------------------------------
1 | using System.Net;
2 | using EasyHttp.Infrastructure;
3 | using FakeItEasy;
4 | using FluentAssertions;
5 | using FluentTc.Domain;
6 | using FluentTc.Engine;
7 | using FluentTc.Tests.Locators;
8 | using NUnit.Framework;
9 | using Ploeh.AutoFixture;
10 |
11 | namespace FluentTc.Tests.Engine
12 | {
13 | [TestFixture]
14 | public class BuildConfigurationRetrieverTests
15 | {
16 | [Test]
17 | public void RetrieveBuildConfigurations_NotFoundExceptionThrown_Empty()
18 | {
19 | // Arrange
20 | var fixture = Auto.Fixture();
21 | var teamCityCaller = fixture.Freeze();
22 | A.CallTo(() => teamCityCaller.GetFormat("/app/rest/buildTypes/{0}", A