Esempio n. 1
0
        public void EnableAgent_Id()
        {
            // Arrange
            var teamCityCaller = A.Fake <TeamCityCaller>();

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

            // Act
            connectedTc.EnableAgent(_ => _.Id(123));

            // Assert
            A.CallTo(
                () =>
                teamCityCaller.PutFormat("True", "text/plain", "/app/rest/agents/{0}/enabled",
                                         A <object[]> .That.IsSameSequenceAs(new[] { "id:123" }))).MustHaveHappened();
        }
Esempio n. 2
0
        public void EnableAgent_Id()
        {
            // Arrange
            var teamCityCaller = A.Fake<TeamCityCaller>();

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

            // Act
            connectedTc.EnableAgent(_ => _.Id(123));

            // Assert
            A.CallTo(
                () =>
                    teamCityCaller.PutFormat("True", "text/plain", "/app/rest/agents/{0}/enabled",
                        A<object[]>.That.IsSameSequenceAs(new[] {"id:123"}))).MustHaveHappened();
        }