Exemplo n.º 1
0
 public void Ensure_that_moving_items_requires_you_to_pick_them_up_first()
 {
     Avatar avatar = new Avatar();
     BarOfSoap barOfSoap = new BarOfSoap();
     House house = new House();
     avatar.Put(barOfSoap).In(house);
 }
Exemplo n.º 2
0
 public void Ensure_that_moving_items_properly_transfers_them()
 {
     Avatar avatar = new Avatar();
     BarOfSoap barOfSoap = new BarOfSoap();
     avatar.PickUp(barOfSoap);
     House house = new House();
     avatar.Put(barOfSoap).In(house);
     Assert.AreSame(house, barOfSoap.ParentContainerObject);
     Assert.IsFalse(avatar.Contents.Any(x => x.ObjectId == barOfSoap.ObjectId));
     Assert.IsTrue(house.Contents.Any(x => x.ObjectId == barOfSoap.ObjectId));
 }