public void GetSortedCities_Successfully() { string city = "Göteborg"; var list = controller.GetSortedCity("Göteborg"); int total = list.Count; // Count each by city int byCity = (list.Where(x => x.city.ToLower() == city.ToLower())).ToList().Count; Assert.AreEqual(byCity, total); }