cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [70/81] [abbrv] git commit: updated refs/heads/ui-restyle to e901b82
Date Mon, 14 Oct 2013 17:18:02 GMT
test fix: no assertion on the number of fileds returned

Removed the assertion on the number of fields from ReflectUtil because it did not work with
bytecode manipulation like what sonar works with.

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/982db550
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/982db550
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/982db550

Branch: refs/heads/ui-restyle
Commit: 982db550eb3ccac16aa92a76e4f4abf87377c04f
Parents: fa0c685
Author: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Authored: Fri Oct 11 18:47:08 2013 +0200
Committer: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Committed: Fri Oct 11 18:49:10 2013 +0200

----------------------------------------------------------------------
 utils/test/com/cloud/utils/ReflectUtilTest.java | 4 ----
 1 file changed, 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/982db550/utils/test/com/cloud/utils/ReflectUtilTest.java
----------------------------------------------------------------------
diff --git a/utils/test/com/cloud/utils/ReflectUtilTest.java b/utils/test/com/cloud/utils/ReflectUtilTest.java
index fc1cda6..baa5dd8 100644
--- a/utils/test/com/cloud/utils/ReflectUtilTest.java
+++ b/utils/test/com/cloud/utils/ReflectUtilTest.java
@@ -115,7 +115,6 @@ public final class ReflectUtilTest {
     public void getAllFieldsForClassWithFoo() throws NoSuchFieldException, SecurityException
{
         Set<Field> fooFields = ReflectUtil.getAllFieldsForClass(Foo.class, new Class<?>
[] {});
         Assert.assertNotNull(fooFields);
-        Assert.assertEquals(2, fooFields.size());
         Assert.assertTrue(fooFields.contains(Foo.class.getDeclaredField("fooField")));
         Assert.assertTrue(fooFields.contains(Foo.class.getDeclaredField("fooIntField")));
     }
@@ -124,7 +123,6 @@ public final class ReflectUtilTest {
     public void getAllFieldsForClassWithBar() throws NoSuchFieldException, SecurityException
{
         Set<Field> barFields = ReflectUtil.getAllFieldsForClass(Bar.class, new Class<?>
[] {});
         Assert.assertNotNull(barFields);
-        Assert.assertEquals(4, barFields.size());
         Assert.assertTrue(barFields.contains(Foo.class.getDeclaredField("fooField")));
         Assert.assertTrue(barFields.contains(Foo.class.getDeclaredField("fooIntField")));
         Assert.assertTrue(barFields.contains(Bar.class.getDeclaredField("barField")));
@@ -135,7 +133,6 @@ public final class ReflectUtilTest {
     public void getAllFieldsForClassWithBarWithoutFoo() throws NoSuchFieldException, SecurityException
{
         Set<Field> barFields = ReflectUtil.getAllFieldsForClass(Bar.class, new Class<?>
[] {Foo.class});
         Assert.assertNotNull(barFields);
-        Assert.assertEquals(2, barFields.size());
         Assert.assertTrue(barFields.contains(Bar.class.getDeclaredField("barField")));
         Assert.assertTrue(barFields.contains(Bar.class.getDeclaredField("barIntField")));
     }
@@ -144,7 +141,6 @@ public final class ReflectUtilTest {
     public void getAllFieldsForClassWithBazWithoutBar() throws NoSuchFieldException, SecurityException
{
         Set<Field> bazFields = ReflectUtil.getAllFieldsForClass(Baz.class, new Class<?>
[] {Bar.class});
         Assert.assertNotNull(bazFields);
-        Assert.assertEquals(4, bazFields.size());
         Assert.assertTrue(bazFields.contains(Foo.class.getDeclaredField("fooField")));
         Assert.assertTrue(bazFields.contains(Foo.class.getDeclaredField("fooIntField")));
         Assert.assertTrue(bazFields.contains(Baz.class.getDeclaredField("bazField")));


Mime
View raw message