Beispiel #1
0
        public void Return_Null_Object_When_Not_Found()
        {
            var auto = new AutomobileRepository().FindById("foo");

            Assert.Equal(Automobile.Null, auto);
            Assert.Empty(auto.Start());
            Assert.Empty(auto.Stop());
        }
Beispiel #2
0
        public void Return_Concrete_Automobile()
        {
            var auto = new AutomobileRepository().FindById("mini");

            Assert.NotEqual(Automobile.Null, auto);
            Assert.Equal("Mini Start", auto.Start());
            Assert.Equal("Mini Stop", auto.Stop());
        }