public void TestThatObjectMotherBMWWorks() { var result = ObjectMother.BMW(); Assert.AreEqual(result.Name, "BMW 3 Series"); Assert.AreEqual(result.getBasePrice(), 80); }
public void TestThatObjectMotherSpawnedCarWorks() { Car beamer = ObjectMother.BMW(); String nameResult = beamer.Name; Assert.AreEqual("Beamer", nameResult); }
public void TestThatCarRentalPricesAreCorrectWithObjectMother() { Car BMW = ObjectMother.BMW(); Car Saab = ObjectMother.Saab(); Assert.AreEqual(80, BMW.getBasePrice()); Assert.AreEqual(10 * 7 * .8, Saab.getBasePrice()); }
public void TestObjectMotherWithDatabase() { IDatabase mockDatabase = mocks.Stub <IDatabase>(); mockDatabase.Miles = 2000; var target = ObjectMother.BMW(); target.Database = mockDatabase; int milesTravled = target.Mileage; Assert.AreEqual(2000, milesTravled); }
public void TestMileage() { IDatabase mockDatabase = mocks.Stub <IDatabase>(); Int32 Mil = 100; mockDatabase.Miles = Mil; var target = ObjectMother.BMW(); target.Database = mockDatabase; int miles = target.Mileage; Assert.AreEqual(miles, Mil); }
public void TestThatCarDoesGetMileageFromDatabaseWithObjectMother() { IDatabase mockDatabase = mocks.Stub <IDatabase>(); Int32 Miles = 100; mockDatabase.Miles = Miles; var target = ObjectMother.BMW(); target.Database = mockDatabase; int miles = target.Mileage; Assert.AreEqual(miles, Miles); }
public void TestThatTheCarGetsTheCorrectCarNumberAndThatTheReturnedCarNumberIsPerfectlyCorrectWithoutADoubt() { IDatabase mockDatabase = mocks.Stub <IDatabase>(); using (mocks.Record()) { mockDatabase.getCarLocation(15); LastCall.Return("foo"); } var target = ObjectMother.BMW(); target.Database = mockDatabase; Assert.AreEqual("foo", target.getCarLocation(15)); }
public void TestThatTheCarCanCorrectlyTrackHowManyMilesItHasBeenDrivenSinceItWasCreatedInSomeRandomFactoryInDetroitOrChinaIfItIsAJapaneseCarBecauseDetroitIsPrettyMuchDead() { IDatabase mockDatabase = mocks.Stub <IDatabase>(); mockDatabase.Miles = 100; var target = ObjectMother.BMW(); target.Database = mockDatabase; int mileage = target.Mileage; Assert.AreEqual(mileage, 100); }
public void TestThatObjectMother() { IDatabase mockDatabase = mocks.Stub <IDatabase>(); int mileage = 100; mockDatabase.Miles = mileage; var target = ObjectMother.BMW(); target.Database = mockDatabase; int miles = target.Mileage; String name = target.Name; Assert.AreEqual(miles, mileage); Assert.AreEqual("BMW Z4 Roadster", name); }
public void TestThatCarDoesGetMileageFromDatabase() { IDatabase mockDatabase = mocks.Stub <IDatabase>(); int Mileage = 100; mockDatabase.Miles = Mileage; var target = ObjectMother.BMW(); target.Database = mockDatabase; int mileCount = target.Mileage; Assert.AreEqual(mileCount, Mileage); }
public void TestThatMileageISCorrect() { IDatabase mockDatabase = mocks.Stub <IDatabase>(); Int32 Miles = 100; mockDatabase.Miles = Miles; var target = ObjectMother.BMW(); target.Database = mockDatabase; int mileage = target.Mileage; Assert.AreEqual(mileage, Miles); }
public void TestThatLocationGetsFromDatabase() { IDatabase mockDatabase = mocks.Stub <IDatabase>(); String carLocation = "Earth"; using (mocks.Record()) { mockDatabase.getCarLocation(23); LastCall.Return(carLocation); } var target = ObjectMother.BMW(); target.Database = mockDatabase; String result; result = target.getCarLocation(23); Assert.AreEqual(result, carLocation); }
public void TestThatTheCarGetsTheCorrectCarNumberAndThatTheReturnedCarNumberIsPerfectlyCorrectWithoutADoubt() { IDatabase mockDatabase = mocks.Stub <IDatabase>(); String Loc10 = "On Sriram's Whale, Next To SQL."; String Loc150 = "In Sriram's Office"; using (mocks.Record()) { mockDatabase.getCarLocation(10); LastCall.Return(Loc10); mockDatabase.getCarLocation(150); LastCall.Return(Loc150); } var target = ObjectMother.BMW(); target.Database = mockDatabase; Assert.AreEqual(Loc10, target.getCarLocation(10)); Assert.AreEqual(Loc150, target.getCarLocation(150)); }
public void TestObjectMother() { var target = ObjectMother.BMW(); Assert.AreEqual("BMW", target.Name); }
public void TestThatObjectMotherWorksProperly() { var target = ObjectMother.BMW(); Assert.AreEqual("It's a BMW.", target.Name); }
public void TestThatCarHasCorrectBasePriceForTenDays() { var target = ObjectMother.BMW(); Assert.AreEqual(80, target.getBasePrice()); }
public void ObjectMotherTestCarName() { var target = ObjectMother.BMW(); Assert.AreEqual(target.Name, "BMW Something"); }
public void TestThatCarHasCorrectBasePriceForTenDays_ObjectMotherStyle() { var target = ObjectMother.BMW(); //Car(21) Assert.AreEqual(168, target.getBasePrice()); }
public void TestThatBMWBookingIsCorrectlyPriced() { var target = ObjectMother.BMW(); Assert.AreEqual(80, target.getBasePrice()); }
public void TestThatBMWHasCorrectRental() { Car bmw = ObjectMother.BMW(); Assert.AreEqual(80, bmw.getBasePrice()); }
public void TestObjectMother() { var target = ObjectMother.BMW(); Assert.AreEqual(target.Name, "BMW M5 Sports Car"); }