summaryrefslogtreecommitdiff
path: root/ridljar/test
diff options
context:
space:
mode:
authorRobert Antoni Buj i Gelonch <robert.buj@gmail.com>2014-09-28 11:07:12 +0200
committerDavid Ostrovsky <david@ostrovsky.org>2014-09-28 18:09:17 +0000
commitffbdd805062b6587d17395e956f275e70a72a6c7 (patch)
tree9ac6ccb7a443ac0b87c0c5d4a086113cfec468e4 /ridljar/test
parentcfd1310bef1f8c61b53fa0343f95da4abae0f583 (diff)
ridljar: Any_Test & UnoRuntime_Test (JUnit)
Modify exception test in Any_Test. Replace assertTrue with AsserSame & AssertNotSame for equality operator in UnoRuntime_Test. $ make JunitTest_ridljar_uno Change-Id: I42a8380e7c4aed79af976165224c2af25c50fbce Reviewed-on: https://gerrit.libreoffice.org/11673 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
Diffstat (limited to 'ridljar/test')
-rw-r--r--ridljar/test/com/sun/star/uno/Any_Test.java10
-rw-r--r--ridljar/test/com/sun/star/uno/UnoRuntime_Test.java6
2 files changed, 10 insertions, 6 deletions
diff --git a/ridljar/test/com/sun/star/uno/Any_Test.java b/ridljar/test/com/sun/star/uno/Any_Test.java
index 9ecde9e5388e..6dc3a15b1b8d 100644
--- a/ridljar/test/com/sun/star/uno/Any_Test.java
+++ b/ridljar/test/com/sun/star/uno/Any_Test.java
@@ -18,18 +18,22 @@
package com.sun.star.uno;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import org.junit.Test;
import static org.junit.Assert.*;
public final class Any_Test {
+
+ private static final Logger logger = Logger.getLogger(Any_Test.class.getName());
+
@Test public void testAnyAny() {
- boolean caught = false;
try {
new Any(Type.ANY, null);
+ fail("IllegalArgumentException expected");
} catch (IllegalArgumentException e) {
- caught = true;
+ logger.log(Level.FINE, "IllegalArgumentException caught");
}
- assertTrue(caught);
}
@Test public void testComplete() {
diff --git a/ridljar/test/com/sun/star/uno/UnoRuntime_Test.java b/ridljar/test/com/sun/star/uno/UnoRuntime_Test.java
index e92422ffa1e4..fb2afe8ae1a1 100644
--- a/ridljar/test/com/sun/star/uno/UnoRuntime_Test.java
+++ b/ridljar/test/com/sun/star/uno/UnoRuntime_Test.java
@@ -111,9 +111,9 @@ public final class UnoRuntime_Test {
Object v1 = t1.context.getValueByName("");
Object v2 = t2.context.getValueByName("");
assertFalse(t1.context == t2.context);
- assertTrue(v1 == t1);
- assertTrue(v2 == t2);
- assertFalse(v1 == v2);
+ assertSame(v1, t1);
+ assertSame(v2, t2);
+ assertNotSame(v1, v2);
}
private interface Ifc extends XInterface {}