diff options
author | David Gageot <david@gageot.net> | 2012-07-05 09:28:50 +0200 |
---|---|---|
committer | David Gageot <david@gageot.net> | 2012-07-05 09:28:50 +0200 |
commit | e8f9f465365d336d69276cd392262b64a1516501 (patch) | |
tree | d45b23920951667102595425518f05bbd52c3cac /sonar-server/src/test | |
parent | 0607151797ad10b8905a85b8345019a35a10959c (diff) | |
download | sonarqube-e8f9f465365d336d69276cd392262b64a1516501.tar.gz sonarqube-e8f9f465365d336d69276cd392262b64a1516501.zip |
Revert "SONAR-3529 First baby step in providing property sets"
This reverts commit b547f32a3de0381e41b2da6cfab1545f7447b315.
Diffstat (limited to 'sonar-server/src/test')
-rw-r--r-- | sonar-server/src/test/java/org/sonar/server/ui/ViewProxyTest.java | 38 |
1 files changed, 3 insertions, 35 deletions
diff --git a/sonar-server/src/test/java/org/sonar/server/ui/ViewProxyTest.java b/sonar-server/src/test/java/org/sonar/server/ui/ViewProxyTest.java index 725592eb4ab..e3260630791 100644 --- a/sonar-server/src/test/java/org/sonar/server/ui/ViewProxyTest.java +++ b/sonar-server/src/test/java/org/sonar/server/ui/ViewProxyTest.java @@ -19,8 +19,6 @@ */ package org.sonar.server.ui; -import org.sonar.api.web.WidgetPropertySet; - import org.junit.rules.ExpectedException; import org.junit.Rule; @@ -142,15 +140,6 @@ public class ViewProxyTest { } @Test - public void should_support_property_sets() { - ViewProxy proxy = new ViewProxy<Widget>(new EditableWidgetWithSets()); - - assertThat(proxy.getWidgetProperties()).hasSize(4); - assertThat(proxy.getWidgetPropertiesBySet().keySet()).hasSize(3); - assertThat(proxy.getWidgetPropertiesBySet().values()).hasSize(4); - } - - @Test public void widget_should_not_be_global_by_default() { ViewProxy proxy = new ViewProxy<Widget>(new EditableWidget()); @@ -169,7 +158,7 @@ public class ViewProxyTest { exception.expect(IllegalArgumentException.class); exception.expectMessage("INVALID"); exception.expectMessage("WidgetWithInvalidScope"); - + new ViewProxy<Widget>(new WidgetWithInvalidScope()); } @@ -267,6 +256,7 @@ class FakeView implements View { @WidgetProperty(key = "bar", defaultValue = "30", type = WidgetPropertyType.INTEGER) }) class EditableWidget implements Widget { + public String getId() { return "w1"; } @@ -276,29 +266,6 @@ class EditableWidget implements Widget { } } -@WidgetProperties(sets = { - @WidgetPropertySet(key = "set1", - value = { - @WidgetProperty(key = "foo", optional = false), - @WidgetProperty(key = "bar", optional = false), - }), - @WidgetPropertySet(key = "set2", - value = { - @WidgetProperty(key = "qix", optional = false), - })}, - value = { - @WidgetProperty(key = "fizz", optional = false) - }) -class EditableWidgetWithSets implements Widget { - public String getId() { - return "w3"; - } - - public String getTitle() { - return "W3"; - } -} - @WidgetScope("GLOBAL") class GlobalWidget implements Widget { public String getId() { @@ -326,6 +293,7 @@ class WidgetWithInvalidScope implements Widget { @WidgetProperty(key = "bar") }) class WidgetWithOptionalProperties implements Widget { + public String getId() { return "w2"; } |