public async Task GetVersionGroupResourceAsyncIntegrationTest() { // assemble PokeApiClient client = new PokeApiClient(); // act VersionGroup versionGroup = await client.GetResourceAsync <VersionGroup>(1); // assert Assert.True(versionGroup.Id != default(int)); }
/// <summary> /// Returns the generation of the given version group. /// </summary> public async Task <GenerationEntry> GetByVersionGroup(VersionGroup versionGroup) { return(await Upsert(versionGroup.Generation)); }
public void AppendVersionGroup(TextWriter writer, VersionGroup versionGroup, string language) { Guard.AgainstNull(versionGroup, "versionGroup"); Guard.AgainstNull(writer, "writer"); Guard.AgainstNullAndEmpty(language, "language"); if (!versionGroup.Version.Equals(VersionRange.All)) { var message = $"#### Version '{versionGroup.Version.ToFriendlyString()}'"; writer.WriteLine(message); } var format = $@"```{language} {versionGroup.Value} ```"; writer.WriteLine(format); }