Zebra Game Kata Part 8 - Answer Tests.

Here are the tests I wrote.

ZebraGame.Test/ZebraProblemTest.cs
using System.Linq;
using NUnit.Framework;

namespace ZebraGame.Test
{
    [TestFixture]
    public class ZebraProblemTest
    {
        private ZebraProblem zebraProblem;

        [SetUp]
        public void Setup()
        {
            zebraProblem = new ZebraProblem();
        }

        [Test]
        public void Five_Houses()
        {
            Assert.AreEqual(5, zebraProblem.Houses.Count, 
                "There must be five houses.");
        }

        [Test]
        public void Unique_Front_Doors()
        {
            zebraProblem.Houses.ForEach(house => 
                Assert.AreEqual(1, zebraProblem.Houses
                    .Where(h => h.DoorColor == house.DoorColor)
                    .Count(),
                "A house was found with the same "
                + "color door as house {0}.",
                house.Id));
        }

        [Test]
        public void Unique_Nationalities()
        {
            zebraProblem.Houses.ForEach(house => 
                Assert.AreEqual(1, zebraProblem.Houses
                    .Where( h => h.Nationality == house.Nationality)
                    .Count(),
                "A house was found with the same "
                + "nationality as house {0}.",
                house.Id));
        }

        [Test]
        public void Unique_Pets()
        {
            zebraProblem.Houses.ForEach(house => 
                Assert.AreEqual(1, zebraProblem.Houses
                    .Where(h => h.Pet == house.Pet)
                    .Count(),
                "A house was found with the same "
                + "pet as house {0}.",
                house.Id));
        }

        [Test]
        public void Unique_Drinks()
        {
            zebraProblem.Houses.ForEach(house => 
                Assert.AreEqual(1, zebraProblem.Houses
                    .Where( h => h.Drink == house.Drink)
                    .ToList()
                    .Count(),
                "A house was found with the same "
                + "drink as house {0}.",
                house.Id));
        }

        [Test]
        public void Unique_Food()
        {
            zebraProblem.Houses.ForEach(house => 
                Assert.AreEqual(1, zebraProblem.Houses
                    .Where(h => h.Food == house.Food)
                    .ToList()
                    .Count(),
                "A house was found with the same "
                + "food as house {0}.",
                house.Id));
        }

        [Test]
        public void Australian_lives_in_the_house_with_the_red_door()
        {
            Assert.IsTrue(zebraProblem.Houses
                .Any(h => h.Nationality == Nationality.Australian
                    && h.DoorColor == DoorColor.Red),
                "The Australian needs to live in the house with "
                + "the red door.");
        }

        [Test]
        public void The_Italian_owns_the_dog()
        {
            Assert.IsTrue(zebraProblem.Houses
                .Any(h => h.Nationality == Nationality.Italian
                    && h.Pet == Pet.Dog),
                "The Italian owns the dog.");
        }

        [Test]
        public void Coffee_is_drunk_in_the_house_with_the_green_door()
        {
            Assert.IsTrue(zebraProblem.Houses
                .Any(h => h.Drink == Drink.Coffee
                    && h.DoorColor == DoorColor.Green),
                "Coffee is drunk in the house with the green door.");
        }

        [Test]
        public void The_Ukrainian_drinks_tea()
        {
            Assert.IsTrue(zebraProblem.Houses
                .Any(h => h.Nationality == Nationality.Ukrainian
                    && h.Drink == Drink.Tea),
                "The Ukrainian drinks tea.");
        }

        [Test]
        public void Green_door_is_immediately_to_the_right_of_ivory_door()
        {
            var greenDoorHouse = zebraProblem.Houses
                .Where(h => h.DoorColor == DoorColor.Green)
                .First();

            var ivoryDoorHouse = zebraProblem.Houses
                .Where(h => h.DoorColor == DoorColor.Ivory)
                .First();

            Assert.IsTrue(ivoryDoorHouse.Id + 1 == greenDoorHouse.Id,
                "The house with the green door is immediately "
                + "to the right (your right) of the house "
                + "with the ivory door.");
        }

        [Test]
        public void mushroom_eater_owns_snails()
        {
            Assert.IsTrue(zebraProblem.Houses
                .Any(h => h.Food == Food.Mushroom 
                    && h.Pet == Pet.Snails),
                "The mushroom-eater owns snails.");
        }

        [Test]
        public void Apples_are_eaten_in_the_house_with_the_yellow_door()
        {
            Assert.IsTrue(zebraProblem.Houses
                .Any(h => h.Food == Food.Apple 
                    && h.DoorColor == DoorColor.Yellow),
                "Apples are eaten in the house "
                + "with the yellow door.");
        }

        [Test]
        public void Milk_is_drunk_in_the_middle_house()
        {
            var milkHouse = zebraProblem.Houses
                .Where(h => h.Drink == Drink.Milk)
                .First();

            Assert.AreEqual(3, milkHouse.Id, 
                "Milk is drunk in the middle house.");
        }

        [Test]
        public void Norwegian_lives_in_the_first_house()
        {
            var norwegianHouse = zebraProblem.Houses
                .Where(h => h.Nationality == Nationality.Norwegian)
                .First();

            Assert.AreEqual(1, norwegianHouse.Id, 
                "The Norwegian lives in the "
                + "first house on the left.");
        }

        [Test]
        public void onions_lives_next_to_fox()
        {
            var onionHouse = zebraProblem.Houses
                .Where(h => h.Food == Food.Onion)
                .First();

            var foxHouse = zebraProblem.Houses
                .Where(h => h.Pet == Pet.Fox)
                .First();

            Assert.IsTrue(onionHouse.Id + 1 == foxHouse.Id 
                || onionHouse.Id - 1 == foxHouse.Id,
                string.Format(
                    "The person who eats onions lives in house {0}, "
                    + "but person with the fox is in house {1}. "
                    + "They should be next to each other.",
                    onionHouse.Id, foxHouse.Id));
        }

        [Test]
        public void Apples_next_to_horse()
        {
            var appleHouse = zebraProblem.Houses
                .Where(h => h.Food == Food.Apple)
                .First();

            var horseHouse = zebraProblem.Houses
                .Where(h => h.Pet == Pet.Horse)
                .First();

            Assert.IsTrue(appleHouse.Id + 1 == horseHouse.Id 
                || appleHouse.Id - 1 == horseHouse.Id,
                string.Format(
                    "The person who eats apples lives in house {0}, "
                    + "but person with the horse is in house {1}. "
                    + "They should be next to each other.",
                    appleHouse.Id, horseHouse.Id));
        }

        [Test]
        public void cake_drinks_orange_juice()
        {
            Assert.IsTrue(zebraProblem.Houses
                .Any(h => h.Food == Food.Cake
                    && h.Drink == Drink.OrangeJuice),
                "The cake-eater drinks orange juice.");
        }

        [Test]
        public void Japanese_eats_bananas()
        {
            Assert.IsTrue(zebraProblem.Houses
                .Any(h => h.Nationality == Nationality.Japanese
                    && h.Food == Food.Banana),
                "The Japanese eats bananas.");
        }

        [Test]
        public void Norwegian_lives_next_to_blue_door()
        {
            var norwegianHouse = zebraProblem.Houses
                .Where(h => h.Nationality == Nationality.Norwegian)
                .First();

            var blueDoorHouse = zebraProblem.Houses
                .Where(h => h.DoorColor == DoorColor.Blue)
                .First();

            Assert.IsTrue(norwegianHouse.Id + 1 == blueDoorHouse.Id 
                || norwegianHouse.Id - 1 == blueDoorHouse.Id,
                string.Format(
                    "The Norwegian lives in house {0} "
                    + "and the blue door house is {1}. "
                    + "They should be next to each other.",
                    norwegianHouse.Id, blueDoorHouse.Id));
        }
    }
}