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); }); })); }
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); }); })); }
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); }); })); }
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); }); })); }
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); }); })); }