public async Task FetchAchieved(bool achieved) { var id = Trophies.First().Id; Assert.That((await Api.Trophies.SetAchievedAsync(Credentials, id)).Success); var trophies = await GetTrophies(achieved); Assert.That(trophies.All(x => x.Achieved == achieved)); Assert.That((await Api.Trophies.RemoveAchievedAsync(Credentials, id)).Success); }
public async Task AddRemove() { var id = Trophies.First().Id; // add trophy Assert.That((await Api.Trophies.SetAchievedAsync(Credentials, id)).Success); var trophies = await GetTrophies(); Assert.That(trophies.Any(x => x.Achieved && x.Id == id)); // remove trophy Assert.That((await Api.Trophies.RemoveAchievedAsync(Credentials, id)).Success); trophies = await GetTrophies(); Assert.That(!trophies.Any(x => x.Achieved && x.Id == id)); }