public void TruckLoadCargoTest() { object[] test = new[] { "test test test" }; _truck.LoadCargo(test); _truck.LoadCargo(test); object[] objects = _truck.UnLoadCargo <object[]>().First(); Assert.IsNotNull(objects); Assert.AreEqual(1, objects.Length); Assert.AreEqual(objects[0], test[0]); }
public void TruckLoadCargoTest() { const string test = "test test test"; _truck.LoadCargo(test); _truck.LoadCargo(test); IEnumerable <string> objects = _truck.UnLoadCargo <string>(); Assert.IsNotNull(objects); IEnumerable <string> enumerable = objects as IList <string> ?? objects.ToList(); Assert.AreEqual(2, enumerable.Count()); Assert.AreEqual(enumerable.First(), test); }