From e8f9f465365d336d69276cd392262b64a1516501 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Thu, 5 Jul 2012 09:28:50 +0200 Subject: Revert "SONAR-3529 First baby step in providing property sets" This reverts commit b547f32a3de0381e41b2da6cfab1545f7447b315. --- .../java/org/sonar/server/ui/ViewProxyTest.java | 38 ++-------------------- 1 file changed, 3 insertions(+), 35 deletions(-) (limited to 'sonar-server/src/test') 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; @@ -141,15 +139,6 @@ public class ViewProxyTest { assertThat(proxy.getWidgetProperties()).hasSize(2); } - @Test - public void should_support_property_sets() { - ViewProxy proxy = new ViewProxy(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(new EditableWidget()); @@ -169,7 +158,7 @@ public class ViewProxyTest { exception.expect(IllegalArgumentException.class); exception.expectMessage("INVALID"); exception.expectMessage("WidgetWithInvalidScope"); - + new ViewProxy(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"; } -- cgit v1.2.3