Example #1
0
        public void RefuelThrowsExceptionWhenFuelAmountCannotBeZeroOrNegative(double fuelToRefuel)
        {
            var exception = Assert.Throws <ArgumentException>(() => car.Refuel(fuelToRefuel));

            Assert.That("Fuel amount cannot be zero or negative!", Contains.Substring(exception.Message));
        }
Example #2
0
        public void DriveThrowsExceptionWhenFuelNeededIsBiggerThanFuelAmount()
        {
            var exception = Assert.Throws <InvalidOperationException>(() => car.Drive(100));

            Assert.That(exception.Message, Contains.Substring("You don't have enough fuel to drive!"));
        }
 public void TimelineEditor_IsLoadedFromDll()
 {
     Assert.That(typeof(TimelineEditor).Assembly.FullName, Contains.Substring("Unity.Timeline.Editor"));
 }