Esempio n. 1
0
    void SetState(GameState newState)
    {
        Debug.Log("New State = " + newState);

        Hide(UI_ControlsLeft);
        Hide(UI_ControlsLeftThumb);
        Hide(UI_ControlsRight);
        Hide(UI_IngredientsList);
        Hide(UI_OrderName);
        Hide(UI_OrderResult.gameObject);
        Hide(UI_Stars.gameObject);
        Hide(UI_ControlsSubmit);
        Hide(UI_BreweryName);

        switch (newState)
        {
        case GameState.Menu:
            break;

        case GameState.Pour:
        {
            Show(UI_ControlsLeft);
            Show(UI_ControlsLeftThumb);
            Show(UI_ControlsRight);
            Show(UI_IngredientsList);
            Show(UI_OrderName);
            Show(UI_BreweryName);

            SetupCocktail(GetNextCocktail());
        }
        break;

        case GameState.Submit:
        {
            Show(UI_OrderResult.gameObject);
            Show(UI_Stars.gameObject);
            Show(UI_ControlsSubmit);

            UI_Stars.Set(stars);
            UI_OrderResult.text = resultText;
        }
        break;

        case GameState.Loose:
            break;
        }

        State = newState;
    }
Esempio n. 2
0
        public void Hotel_Add()
        {
            LoginAsAdmin();

            Go.To <HotelsPage>().
            Add.ClickAndGo().
            HotelName.SetRandom(out string name).
            HotelDescription.SetRandom(out string description).
            Stars.Set(3).
            Type.Set("Hotel").
            From.Set("25").
            To.Set("26").
            Location.Set("London").
            Submit().
            Hotels.Rows[x => x.Name == name].Should.BeVisible();
        }
Esempio n. 3
0
        public void Hotel_Edit()
        {
            LoginAsAdmin();

            Go.To <HotelsPage>().
            Add.ClickAndGo().
            HotelName.SetRandom(out string name).
            HotelDescription.SetRandom(out string description).
            Stars.Set(3).
            Type.Set("Hotel").
            From.Set("25/01/2019").
            To.Set("26/01/2019").
            Location.Set("London").
            Submit().
            Hotels.Rows[x => x.Name == name].Edit.ClickAndGo <HotelEditPage>().
            Location.Set("Washington").
            Submit().
            Hotels.Rows[x => x.Name == name].Location.Should.Contain("Washington");
        }
Esempio n. 4
0
        public void Hotel_Room_Add()
        {
            LoginAsAdmin();

            Go.To <HotelsPage>().
            Add.ClickAndGo().
            HotelName.SetRandom(out string name).
            HotelDescription.SetRandom(out string description).
            Stars.Set(4).
            Type.Set("Hotel").
            From.Set("26/01/2019").
            To.Set("27/01/2019").
            Location.Set("Los Angeles").
            Submit();

            Go.To <RoomsPage>().
            Add.ClickAndGo().
            RoomType.Set("Superior Double").
            Hotel.Set(name).
            Price.Set(200).
            Submit().
            Rooms.Rows[x => x.Hotel == name].Hotel.Should.Equal(name).
            Rooms.Rows[x => x.Hotel == name].Price.Should.Equal("200");
        }