test_class.file: app/src/test/java/edu/wpi/first/shuffleboard/app/json/DashboardTabPaneSaverTest.java
test_class.identifier: DashboardTabPaneSaverTest
test_class.superclass: extends ApplicationTest
test_case.body: @Test
    public void testDeserialize() throws Exception {
      Reader reader = new InputStreamReader(getClass().getResourceAsStream("/test.json"), "UTF-8");
      DashboardData data = JsonBuilder.forSaveFile().fromJson(reader, DashboardData.class);
      DashboardTabPane dashboard = data.getTabPane();
  
      assertEquals(2 + 1, dashboard.getTabs().size(), "There should be 2 dashboard tabs and 1 adder tab");
  
      DashboardTab firstTab = (DashboardTab) dashboard.getTabs().get(0);
      DashboardTab secondTab = (DashboardTab) dashboard.getTabs().get(1);
      assertEquals("First Tab", firstTab.getTitle(), "Title of the first tab was wrong");
      assertEquals("Second Tab", secondTab.getTitle(), "Title of the second tab was wrong");
      assertFalse(firstTab.isAutoPopulate(), "The first tab should not be autopopulating");
      assertTrue(secondTab.isAutoPopulate(), "The second tab should be autopopulating");
      assertEquals("", firstTab.getSourcePrefix(), "The first tab should not have a source prefix");
      assertEquals("foo", secondTab.getSourcePrefix(), "The second tab should autopopulate from 'foo'");
      assertEquals(1, firstTab.getWidgetPane().getTiles().size(), "There should only be one tile");
      Tile tile = firstTab.getWidgetPane().getTiles().get(0);
      Component content = tile.getContent();
      assertTrue(content instanceof DummyBooleanBox);
    }
test_case.class_method_signature: DashboardTabPaneSaverTest.testDeserialize()
test_case.full_signature: @Test public void testDeserialize()
test_case.identifier: testDeserialize
test_case.invocations: getResourceAsStream getClass fromJson forSaveFile getTabPane assertEquals size getTabs get getTabs get getTabs assertEquals getTitle assertEquals getTitle assertFalse isAutoPopulate assertTrue isAutoPopulate assertEquals getSourcePrefix assertEquals getSourcePrefix assertEquals size getTiles getWidgetPane get getTiles getWidgetPane getContent assertTrue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDeserialize()
focal_class.file: app/src/main/java/edu/wpi/first/shuffleboard/app/json/DashboardTabPaneSaver.java
focal_class.identifier: DashboardTabPaneSaver
focal_class.interfaces: implements ElementTypeAdapter<DashboardTabPane>
focal_class.class_method_signature: DashboardTabPaneSaver.serialize(DashboardTabPane src, JsonSerializationContext context)
focal_class.full_signature: @Override public JsonElement serialize(DashboardTabPane src, JsonSerializationContext context)
focal_class.identifier: serialize
focal_class.modifiers: @Override public
focal_class.parameters: (DashboardTabPane src, JsonSerializationContext context)
focal_class.return: JsonElement
focal_class.signature: JsonElement serialize(DashboardTabPane src, JsonSerializationContext context)
focal_class.class_method_signature: DashboardTabPaneSaver.deserialize(JsonElement json, JsonDeserializationContext context)
focal_class.full_signature: @Override public DashboardTabPane deserialize(JsonElement json, JsonDeserializationContext context)
focal_class.identifier: deserialize
focal_class.modifiers: @Override public
focal_class.parameters: (JsonElement json, JsonDeserializationContext context)
focal_class.return: DashboardTabPane
focal_class.signature: DashboardTabPane deserialize(JsonElement json, JsonDeserializationContext context)
focal_method.body: @Override
    public DashboardTabPane deserialize(JsonElement json, JsonDeserializationContext context) throws JsonParseException {
      JsonArray jsonTabs = json.getAsJsonArray();
      List<Tab> tabs = new ArrayList<>(jsonTabs.size());
  
      for (JsonElement i : jsonTabs) {
        JsonObject obj = i.getAsJsonObject();
        String title = obj.get("title").getAsString();
        DashboardTab tab = new DashboardTab(title);
        tab.setWidgetPane(context.deserialize(obj.get("widgetPane"), WidgetPane.class));
        tab.setSourcePrefix(obj.get("autoPopulatePrefix").getAsString());
        tab.setAutoPopulate(obj.get("autoPopulate").getAsBoolean());
        tabs.add(tab);
      }
  
      return new DashboardTabPane(tabs.toArray(new Tab[]{}));
    }
focal_method.class_method_signature: DashboardTabPaneSaver.deserialize(JsonElement json, JsonDeserializationContext context)
focal_method.full_signature: @Override public DashboardTabPane deserialize(JsonElement json, JsonDeserializationContext context)
focal_method.identifier: deserialize
focal_method.invocations: getAsJsonArray size getAsJsonObject getAsString get setWidgetPane deserialize get setSourcePrefix getAsString get setAutoPopulate getAsBoolean get add toArray
focal_method.modifiers: @Override public
focal_method.parameters: (JsonElement json, JsonDeserializationContext context)
focal_method.return: DashboardTabPane
focal_method.signature: DashboardTabPane deserialize(JsonElement json, JsonDeserializationContext context)