public void CancelSearchUserNoSearchMatch() { int userId = this.getRandomUserId(); //ACT CancelSearchOpponentRespons respons = Client.CancelSearchOpponent(new CancelSearchOpponentRequest { UserId = userId }); //Assert Assert.NotNull(respons); Assert.AreEqual(respons.Respons.Status, ServiceResponseStatus.Ok); }
public async Task CancelSearch() { int userId = this.getRandomUserId(); int gameType = 1; //ACT AsyncUnaryCall <SearchOpponentRespons> responsSearchAsync = Client.SearchOpponentAsync(new SearchOpponentRequest { GameType = gameType, UserId = userId }); Thread.Sleep(100); CancelSearchOpponentRespons respons = Client.CancelSearchOpponent(new CancelSearchOpponentRequest { UserId = userId }); var responSearch = await responsSearchAsync; //Assert Assert.NotNull(respons); Assert.AreEqual(respons.Respons.Status, ServiceResponseStatus.Ok); Assert.NotNull(responSearch); Assert.AreEqual(responSearch.Respons.Status, ServiceResponseStatus.Cancel); }