private static void PrintAllUserEmails() { var connectedTc = new RemoteTc() .Connect(_ => _.ToHost(TeamCityHost).AsUser(Username, Password)); connectedTc .GetAllUsers() .Select(u => connectedTc.GetUser(_ => _.Id(u.Id))) .ToList() .ForEach(u => Console.WriteLine(u.Email)); }
public void GetAllUsers() { // Arrange var teamCityCaller = CreateTeamCityCaller(); var connectedTc = new RemoteTc().Connect(_ => _.AsGuest(), teamCityCaller); // Act List <User> users = connectedTc.GetAllUsers(); // Assert A.CallTo(() => teamCityCaller.Get <UserWrapper>(@"/app/rest/users/")).MustHaveHappened(); }
public void GetAllUsers() { // Arrange var teamCityCaller = CreateTeamCityCaller(); var connectedTc = new RemoteTc().Connect(_ => _.AsGuest(), teamCityCaller); // Act List<User> users = connectedTc.GetAllUsers(); // Assert A.CallTo(() => teamCityCaller.Get<UserWrapper>(@"/app/rest/users/")).MustHaveHappened(); }
private static void PrintAllUserEmails() { var connectedTc = new RemoteTc() .Connect(_ => _.ToHost(TeamCityHost).AsUser(Username, Password)); connectedTc .GetAllUsers() .Select(u => connectedTc.GetUser(_ => _.Id(u.Id))) .ToList() .ForEach(u => Console.WriteLine(u.Email)); }