Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public TocContents(String projectName, List<TocItem> items) {
private void createTocContents(String projectName, List<TocItem> items) {
List<Object> tocItems = new ArrayList<>();
// combine guides and tocItems
tocItems.add(new Guide("Overview", "index.md"));
tocItems.add(new Guide("Version history", "history.md"));
tocItems.addAll(items);
// wrap guides + tocItems with product hierarchy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,15 @@ public void getContentsWithProjectName() {
assertEquals(contents.getName(), "google-cloud-project");

List<Object> items = contents.getItems();
assertEquals("Should be 5 items", items.size(), 5);
assertEquals("Should be 4 items", items.size(), 4);

assertEquals("Guide should be first", items.get(0).getClass(), Guide.class);
Guide overview = (Guide) items.get(0);
assertEquals("First guide should be Overview", overview.getName(), "Overview");
assertEquals("Guide should be second", items.get(1).getClass(), Guide.class);
Guide history = (Guide) items.get(1);
Guide history = (Guide) items.get(0);
assertEquals("Second guide should be Version History", history.getName(), "Version history");

assertEquals("Item A should be second", items.get(2), tocItemA);
assertEquals("Item B should be third", items.get(3), tocItemB);
assertEquals("Item C should be fourth", items.get(4), tocItemC);
assertEquals("Item A should be second", items.get(1), tocItemA);
assertEquals("Item B should be third", items.get(2), tocItemB);
assertEquals("Item C should be fourth", items.get(3), tocItemC);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
### YamlMime:TableOfContent
- name: "google-cloud-project"
items:
- name: "Overview"
href: "index.md"
- name: "Version history"
href: "history.md"
- uid: "com.microsoft.samples"
Expand Down