public List <FishCompatibility> Get([FromUri] string[] fishNames) { var fishNamesList = new List <string>(); fishNamesList.AddRange(fishNames); var fishList = FishLoader.LoadFishList(fishNamesList); return(CompatibilityChecker.GetAllFishCompatibility(fishList)); }
public void TestGetAllFishCompatibilityHappyPath() { var selectedFishes = new List <string>() { "clown", "damsels" }; var selectedFishList = FishLoader.LoadFishList(selectedFishes); var allFishCompatibility = CompatibilityChecker.GetAllFishCompatibility(selectedFishList); var anthiasFishCompatibility = allFishCompatibility.FirstOrDefault(pair => pair.MainFish.Name == "anthias"); Assert.AreEqual(allFishCompatibility.Count, 31); Assert.AreEqual(anthiasFishCompatibility.WorstCompatibility, "Yes"); }