public void TestItAddsGroundNetworks() { GroundNetwork network = GroundNetworkFactory.Make(); collection.Add(network); Assert.Single(collection.GroundNetworks); Assert.Equal(network, collection.GroundNetworks[0]); }
private void SpawnGroundMap() { var ground = _world.GetGroundMap(); for (int y = 0; y < ground.GetLength(1); y++) { for (int x = 0; x < ground.GetLength(0); x++) { GroundNetwork gn = Instantiate(groundNetworkPrefab); gn.spriteName = ground[x, y]; gn.transform.position = new Vector3(x + 0.5f, y + 0.5f, 0); NetworkServer.Spawn(gn.gameObject); } } }
public void TestItReturnsElementsInOrder() { GroundNetwork first = GroundNetworkFactory.Make("EGKK"); GroundNetwork second = GroundNetworkFactory.Make("EGGD"); GroundNetwork third = GroundNetworkFactory.Make("EGAC"); sectorElements.Add(first); sectorElements.Add(second); sectorElements.Add(third); IEnumerable <ICompilableElementProvider> expected = new List <ICompilableElementProvider>() { third, second, first }; AssertCollectedItems(expected); }
public GroundNetworkTest() { taxiway1 = GroundNetworkTaxiwayFactory.Make(); taxiway2 = GroundNetworkTaxiwayFactory.Make(); taxiways = new List <GroundNetworkTaxiway> { taxiway1, taxiway2 }; exit1 = GroundNetworkRunwayExitFactory.Make(); exit2 = GroundNetworkRunwayExitFactory.Make(); exits = new List <GroundNetworkRunwayExit> { exit1, exit2 }; network = new GroundNetwork( "EGLL", taxiways, exits ); }