public void GetTeamsTest() { var repo = new TempoRepository(); var response = repo.GetTeams(); Assert.IsNotNull(response); Assert.IsTrue(response.results.Count > 0); }
private static void LoadTempoData() { Console.WriteLine("Loading Tempo Data..."); var rep = new TempoRepository(); var teams = rep.GetTeams(); Console.WriteLine($"Team Count: {teams.results.Count}"); var members = new List <Member>(); foreach (var team in teams.results) { var teamMembers = rep.GetMembers(team.id); members.AddRange(teamMembers.results.Select(x => x.member)); } //Clear out duplicates var distinctMembers = members.Distinct(new MemberComparer()); Console.WriteLine($"Member Count: {distinctMembers.Count()}"); TempoAccountId = distinctMembers.First(x => x.displayName == Configuration["TempoDisplayName"]).accountId; Console.WriteLine($"Tempo Account ID: {TempoAccountId}"); Console.WriteLine("Loading Tempo Data: Complete!"); }