GUI -- Added category to the UiView abstraction.
Change-Id: I55fff4d242e8d6b8d8ce3d25e8f9355dc0ef976a
diff --git a/core/api/src/test/java/org/onosproject/ui/UiExtensionTest.java b/core/api/src/test/java/org/onosproject/ui/UiExtensionTest.java
index 3bd9797..efc0261 100644
--- a/core/api/src/test/java/org/onosproject/ui/UiExtensionTest.java
+++ b/core/api/src/test/java/org/onosproject/ui/UiExtensionTest.java
@@ -22,6 +22,7 @@
import static com.google.common.io.ByteStreams.toByteArray;
import static org.junit.Assert.*;
+import static org.onosproject.ui.UiView.Category.OTHER;
/**
* Tests the default user interface extension descriptor.
@@ -30,26 +31,27 @@
@Test
public void basics() throws IOException {
- UiExtension ext = new UiExtension(ImmutableList.of(new UiView("foo", "Foo View")),
+ UiExtension ext = new UiExtension(ImmutableList.of(new UiView(OTHER, "foo", "Foo View")),
null,
getClass().getClassLoader());
String css = new String(toByteArray(ext.css()));
assertTrue("incorrect css stream", css.contains("foo-css"));
String js = new String(toByteArray(ext.js()));
assertTrue("incorrect js stream", js.contains("foo-js"));
- assertEquals("incorrect views stream", "foo", ext.views().get(0).id());
+ assertEquals("incorrect view id", "foo", ext.views().get(0).id());
+ assertEquals("incorrect view category", OTHER, ext.views().get(0).category());
assertNull("incorrect handler factory", ext.messageHandlerFactory());
}
@Test
public void withPath() throws IOException {
- UiExtension ext = new UiExtension(ImmutableList.of(new UiView("foo", "Foo View")),
+ UiExtension ext = new UiExtension(ImmutableList.of(new UiView(OTHER, "foo", "Foo View")),
null, "custom", getClass().getClassLoader());
String css = new String(toByteArray(ext.css()));
assertTrue("incorrect css stream", css.contains("custom-css"));
String js = new String(toByteArray(ext.js()));
assertTrue("incorrect js stream", js.contains("custom-js"));
- assertEquals("incorrect views stream", "foo", ext.views().get(0).id());
+ assertEquals("incorrect view id", "foo", ext.views().get(0).id());
assertNull("incorrect handler factory", ext.messageHandlerFactory());
}
}
\ No newline at end of file