You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ko...@apache.org on 2013/10/11 18:50:43 UTC

git commit: updated refs/heads/master to 982db55

Updated Branches:
  refs/heads/master fa0c685bc -> 982db550e


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 <la...@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/master
Commit: 982db550eb3ccac16aa92a76e4f4abf87377c04f
Parents: fa0c685
Author: Laszlo Hornyak <la...@gmail.com>
Authored: Fri Oct 11 18:47:08 2013 +0200
Committer: Laszlo Hornyak <la...@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")));