public async Task it_should_get_auth_token() { var client = new TeamCowboyClient(Options); var result = await client.GetUserTokenAsync(username, password); Assert.AreEqual(431672, result.UserId); Assert.IsNotNull(result.Token); }
public async Task it_should_get_team_messages() { var client = new TeamCowboyClient(Options); var authToken = await client.GetUserTokenAsync(username, password); var result = (await client.GetTeamMessagesAsync(authToken.Token, teamId)).ToList(); Assert.AreEqual(133819, result[0].MessageId); Assert.AreEqual("Testing a message", result[0].Title); }
public async Task it_should_get_teams() { var client = new TeamCowboyClient(Options); var authToken = await client.GetUserTokenAsync(username, password); var result = await client.GetUserTeamsAsync(authToken.Token); Assert.IsNotNull(result); Assert.AreEqual(1, result.Count()); }
public async Task it_should_get_team() { var client = new TeamCowboyClient(Options); var authToken = await client.GetUserTokenAsync(username, password); var result = await client.GetTeamAsync(authToken.Token, teamId); Assert.AreEqual(teamId, result.TeamId); Assert.AreEqual("Team 1", result.Name); }
public async Task it_should_get_user() { var client = new TeamCowboyClient(Options); var authToken = await client.GetUserTokenAsync(username, password); var result = await client.GetUserAsync(authToken.Token); Assert.AreEqual(431672, result.UserId); Assert.AreEqual("Suman", result.FirstName); Assert.AreEqual("Chakrabarti", result.LastName); }