Example #1
0
        public void Test_GetCustomerAddress_ReturnsAddress()
        {
            //arrange
            int             id       = 1;
            string          address  = "5 Bar Street, Leeds";
            Customer        customer = new Customer(id, address);
            MainframeSystem system   = new MainframeSystem();

            //act
            string actualValue = system.GetCustomerAddress(customer);

            //assert
            Assert.That(actualValue, Is.EqualTo(address));
        }
Example #2
0
        public void Test_SetCustomerAddress_SetsNewAddress()
        {
            //arrange
            int             id         = 1;
            string          oldAddress = "5 Bar Street, Leeds";
            string          newAddress = "New Address";
            Customer        customer   = new Customer(id, oldAddress);
            MainframeSystem system     = new MainframeSystem();

            //act
            system.SetCustomerAddress(customer, newAddress);

            //assert
            Assert.That(customer.Address, Is.EqualTo(newAddress));
        }
Example #3
0
    public void CreateShipSystems(Ship ship)
    {
        isDebug  = GameController.Instance.isDebuging;
        debugger = Debugger.instance;
        var rooms           = RoomController.Instance.Rooms;
        var amountOfSystems = SystemType.GetNames(typeof(SystemType)).Length;

        ShipSystems = new IShipSystem[amountOfSystems - 1];

        ShipSystems[0] = new ReactorSystem(ship, rooms);
        ShipSystems[1] = new MainframeSystem(ship, rooms);
        ShipSystems[2] = new MainBatterySystem(rooms);
        ShipSystems[3] = new LifeSupportSystem(rooms);
        ShipSystems[4] = new BridgeSystem(ship, rooms, this);
        ShipSystems[5] = new MedbaySystem(rooms);
        ShipSystems[6] = new CargoHoldSystem(rooms);
        //ShipSystems[7] = new CorridorSystem(rooms);
    }