Ejemplo n.º 1
0
        //Authors: Keenen Cates, Simon Owens
        /// <summary>
        /// Tests to see if actual name, capacity, and kid_list match the constructed vehicle object.
        /// </summary>
        /// <param name="actual_name"></param>
        /// <param name="actual_capacity"></param>
        /// <param name="actual_kids"></param>
        /// <param name="expected_vehicle"></param>
        private void AssertVehicleEquals(int actual_capacity, string actual_name,
                                         HashSet <kid> actual_kids, vehicle expected_vehicle)
        {
            // Test for name
            Assert.AreEqual(actual_name, expected_vehicle.getName());

            // Test for capacity
            Assert.AreEqual(actual_capacity, expected_vehicle.getCapacity());

            // Test for list of kids
            CollectionAssert.AreEqual(actual_kids.ToList(), expected_vehicle.getKids().ToList());
        }