예제 #1
0
        public void Should_throws_exception_when_try_to_disembark_passenger_if_smart_fortwo_is_null()
        {
            var place     = new PlaceMock();
            var exception = Assert.Throws <Exception>(() => place.DisembarkPassengerFromSmartFortwo());

            Assert.Equal($"{place.GetType().Name} does not have a smart fortwo", exception.Message);
        }
예제 #2
0
        public void Should_check_whether_smart_fortwo_has_driver_and_throw_exception_if_it_is_null()
        {
            var place     = new PlaceMock();
            var exception = Assert.Throws <Exception>(() => place.SmartFortwoHasDriver());

            Assert.Equal($"{place.GetType().Name} does not have a smart fortwo", exception.Message);
        }
예제 #3
0
        public void Should_throws_exception_when_try_to_put_both_in_a_null_smart_fortwo()
        {
            var place     = new PlaceMock();
            var exception = Assert.Throws <Exception>(() => place.PutBothInSmartFortwo(new Officer("name"), new Pilot("name")));

            Assert.Equal($"{place.GetType().Name} does not have a smart fortwo", exception.Message);
        }
예제 #4
0
        public void Should_throw_exception_when_try_to_get_crew_member_from_a_null_smart_fortwo()
        {
            var place     = new PlaceMock();
            var exception = Assert.Throws <Exception>(() => place.GetSmartFortwoCrewMembers());

            Assert.Equal($"{place.GetType().Name} does not have a smart fortwo", exception.Message);
        }
예제 #5
0
        public void Should_set_crew_members_and_null_smart_fortwo_exception_in_constructor()
        {
            var place = new PlaceMock();

            Assert.Empty(place.CrewMembers);
            Assert.Equal($"{place.GetType().Name} does not have a smart fortwo", place.GetNullSmartFortwoException());
        }