Allon Mureinik has uploaded a new change for review.

Change subject: core: JUnit 4 style for PropertyCompatTest
......................................................................

core: JUnit 4 style for PropertyCompatTest

Fixed PropertyCompatTest to use JUnit 4 style instead of JUnit 3 style -
stopped extending TestCase and added @Test annotations.

Change-Id: I7d3ee0866a05301f354e366a046197b465796d1c
Signed-off-by: Allon Mureinik <[email protected]>
---
M 
backend/manager/modules/compat/src/test/java/org/ovirt/engine/core/compat/PropertyCompatTest.java
1 file changed, 8 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/56/12256/1

diff --git 
a/backend/manager/modules/compat/src/test/java/org/ovirt/engine/core/compat/PropertyCompatTest.java
 
b/backend/manager/modules/compat/src/test/java/org/ovirt/engine/core/compat/PropertyCompatTest.java
index e73eb02..eee14ee 100644
--- 
a/backend/manager/modules/compat/src/test/java/org/ovirt/engine/core/compat/PropertyCompatTest.java
+++ 
b/backend/manager/modules/compat/src/test/java/org/ovirt/engine/core/compat/PropertyCompatTest.java
@@ -1,19 +1,22 @@
 package org.ovirt.engine.core.compat;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
-import junit.framework.TestCase;
-
+import org.junit.Test;
 import org.ovirt.engine.core.compat.backendcompat.PropertyCompat;
 import org.ovirt.engine.core.compat.backendcompat.TypeCompat;
 
-public class PropertyCompatTest extends TestCase {
-    public String someValue = "Anakin";
+public class PropertyCompatTest {
+    private String someValue = "Anakin";
 
+    @Test
     public void testIt() {
         PropertyCompat pc = TypeCompat.GetProperty(this.getClass(), 
"someValue");
         String result = (String) pc.GetValue(this, "JarJar");
@@ -23,6 +26,7 @@
         assertEquals("Null Value", "JarJar", result);
     }
 
+    @Test
     public void testGetAvailableValues() {
         Map<String, String> values = new HashMap<String, String>();
         Set<String> properties = new 
HashSet<String>(Arrays.asList("somevalue"));


--
To view, visit http://gerrit.ovirt.org/12256
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d3ee0866a05301f354e366a046197b465796d1c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to