Пример #1
0
    public IEnumerator AddDeck_Wrong_Deck_Request()
    {
        return(LoomTestContext.ContractAsyncTest(
                   async() =>
        {
            string user = LoomTestContext.CreateUniqueUserId("LoomTest_AddDeck");
            await LoomTestContext.BackendFacade.SignUp(user);

            Deck deck = new Deck
            {
                HeroId = 0,
                Name = "Gaurav",
                Cards = new List <DeckCardData>
                {
                    new DeckCardData
                    {
                        Amount = 100500,
                        CardName = "Izze"
                    }
                }
            };

            await LoomTestContext.AssertThrowsAsync(
                async() =>
            {
                await LoomTestContext.BackendFacade.AddDeck(user, deck, 0);
            });
        }));
    }
Пример #2
0
    public IEnumerator EditDeck()
    {
        return(LoomTestContext.ContractAsyncTest(
                   async() =>
        {
            string user = LoomTestContext.CreateUniqueUserId("LoomTest_EditDeck");
            await LoomTestContext.BackendFacade.SignUp(user);

            Deck deck = new Deck
            {
                Name = "Default"
            };
            await LoomTestContext.BackendFacade.EditDeck(user, deck, 0);
        }));
    }
Пример #3
0
    public IEnumerator AddDeck()
    {
        return(LoomTestContext.ContractAsyncTest(
                   async() =>
        {
            string user = LoomTestContext.CreateUniqueUserId("LoomTest_AddDeck");
            await LoomTestContext.BackendFacade.SignUp(user);

            Deck deck = new Deck
            {
                HeroId = 0,
                Name = "Gaurav"
            };

            await LoomTestContext.BackendFacade.AddDeck(user, deck, 0);
        }));
    }
Пример #4
0
    public IEnumerator EditDeck_Wrong_User_Request()
    {
        return(LoomTestContext.ContractAsyncTest(
                   async() =>
        {
            string user = LoomTestContext.CreateUniqueUserId("LoomTest_EditDeck_wrong_user");
            Deck deck = new Deck
            {
                HeroId = 0,
                Name = "Gaurav"
            };

            await LoomTestContext.AssertThrowsAsync(
                async() =>
            {
                await LoomTestContext.BackendFacade.EditDeck(user, deck, 0);
            });
        }));
    }