public void GetNeighborsTest() { LocationLevelTwoWrap bob = new LocationLevelTwoWrap(new ContainerLocation(new Location("Place"))); bob.AddNeighbor(new LocationLevelTwoWrap(new ContainerLocation(new Location("Place Here"))),Directions.Up); var j = bob.GetNeighbors[Directions.Up]; Assert.IsInstanceOfType(j, typeof (LocationObserverandObservable)); }
public void EqualsToTest() { Terrian1 boo = new Terrian1(); LocationObserverandObservable j = new LocationLevelTwoWrap(new ContainerLocation(new Location("blah"))); LocationObserverandObservable p = new LocationLevelTwoWrap(new ContainerLocation(new Location("blah2"))); j.AddNeighbor(p,Directions.Up); var t = new Player("bob"); j.EnterLocation(t); LocationObserverandObservable L = (LocationObserverandObservable) boo.Start; var r = t.ActorLocationNew.GetNeighbors; LocationObserverandObservable y = (LocationObserverandObservable) r[Directions.Up]; Console.WriteLine(y.Name); Console.WriteLine(L.Name); }