Example #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);
            });
        }));
    }
Example #2
0
 public IEnumerator DeleteDeck_Wrong_User_Request()
 {
     return(LoomTestContext.ContractAsyncTest(
                async() =>
     {
         string user = LoomTestContext.CreateUniqueUserId("LoomTest_DeleteDeck_wrong_User");
         await LoomTestContext.AssertThrowsAsync(
             async() =>
         {
             await LoomTestContext.BackendFacade.DeleteDeck(user, 0, 0);
         });
     }));
 }
Example #3
0
 public IEnumerator TestLoomInit_Wrong_Reader_Link()
 {
     return(LoomTestContext.AsyncTest(
                async() =>
     {
         LoomTestContext.BackendFacade.ReaderHost = "https://www.google.com";
         await LoomTestContext.AssertThrowsAsync(
             async() =>
         {
             await LoomTestContext.BackendFacade.CreateContract(LoomTestContext.BackendDataControlMediator
                                                                .UserDataModel.PrivateKey);
         });
     }));
 }
Example #4
0
 public IEnumerator TestLoomInit_Empty_Reader_Link()
 {
     return(LoomTestContext.AsyncTest(
                async() =>
     {
         LoomTestContext.BackendFacade.ReaderHost = string.Empty;
         await LoomTestContext.AssertThrowsAsync(
             async() =>
         {
             await LoomTestContext.BackendFacade.CreateContract(LoomTestContext.BackendDataControlMediator
                                                                .UserDataModel.PrivateKey);
         });
     }));
 }
Example #5
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);
            });
        }));
    }