public void ArrangeRandomActsOfCoffee(int matchesToArrange) { var consumer = new HrisApiConsumer(); ProfilesIndex profilesIndex = consumer.GetProfilesIndex("namely"); List<Profile> profiles = profilesIndex.profiles.Where(p => p.user_status == "active").ToList(); var transformer = new ProfilesToEmployeesTransformer(); List<Employee> employees = transformer.TransformProfilesToEmployees(profiles); var matches = MakeMatches(employees, matchesToArrange); this.MatchLogger.LogMatches(matches); this.MatchAlerter.AlertMatches(matches); }
public void TransformProfileToEmployee(String apiPreferredName, String transformedFirstName) { //arrange Profile apiHomer = GetApiHomer(apiPreferredName); Employee expectedHomer = GetExpectedHomer(transformedFirstName); //act var transformer = new ProfilesToEmployeesTransformer(); var profiles = new List<Profile>() { apiHomer }; Employee transformedHomer = transformer .TransformProfilesToEmployees(profiles) .Single(); //assert Assert.That(transformedHomer, IsDeeplyEqual.To(expectedHomer)); }