@Test public void testTeamStatsExtractor() { JsonElement stats = mExtractor.call(mAllStats); assertNotNull(stats); assertTrue(stats.isJsonObject()); JsonObject statsObject = stats.getAsJsonObject(); assertTrue(statsObject.has("opr")); assertTrue(statsObject.has("dpr")); assertTrue(statsObject.has("ccwm")); assertEquals(statsObject.get("opr").getAsDouble(), 87.957372917501459, .01); assertEquals(statsObject.get("dpr").getAsDouble(), 50.887943082425011, .01); assertEquals(statsObject.get("ccwm").getAsDouble(), 37.06942983507642, .01); }
public TeamStatsExtractor(String teamKey) { mTeamKey = teamKey; }
TeamStatsExtractor implements Func1<JsonElement, JsonElement> { public TeamStatsExtractor(String teamKey) { mTeamKey = teamKey; } }
TeamStatsExtractor implements Func1<JsonElement, JsonElement> { public TeamStatsExtractor(String teamKey) { mTeamKey = teamKey; } TeamStatsExtractor(String teamKey); }
TeamStatsExtractor implements Func1<JsonElement, JsonElement> { public TeamStatsExtractor(String teamKey) { mTeamKey = teamKey; } TeamStatsExtractor(String teamKey); @Override JsonElement call(JsonElement allStats); }
TeamStatsExtractor implements Func1<JsonElement, JsonElement> { public TeamStatsExtractor(String teamKey) { mTeamKey = teamKey; } TeamStatsExtractor(String teamKey); @Override JsonElement call(JsonElement allStats);  }