public async Task GetBerryFirmnessResourceAsyncIntegrationTest() { // assemble PokeApiClient client = new PokeApiClient(); // act BerryFirmness berryFirmness = await client.GetResourceAsync <BerryFirmness>(1); // assert Assert.True(berryFirmness.Id != default(int)); }
public BerryFirmness RetrieveSpecificBerryFirmness(IDbConnection connection, int firmness_id) { BerryFirmness berryFirmness = null; using (IDbCommand command = database.CreateCommand()) { command.Connection = connection; command.CommandText = Query.GetSpecificBerryFirmness; command.Prepare(); command.AddWithValue("@firmness_id", firmness_id); using (IDataReader reader = command.ExecuteReader()) { if (reader.Read()) { berryFirmness = new BerryFirmness { Id = reader.CheckValue <int>("id"), Identifier = reader.CheckObject <string>("identifier") }; } } } // Command return(berryFirmness); }