Sha256: c3d707891e0bcfdc21b85b8f9414dcbdb42b3dc05898d68913c51316a30a3f72

Contents?: true

Size: 1.25 KB

Versions: 30

Compression:

Stored size: 1.25 KB

Contents

//Copyright (c) Corporation for National Research Initiatives
package javatests;

/**
 * @author updikca1
 */
public class TestSupport {

    public static class AssertionError extends RuntimeException {
        
        public AssertionError() {
            super();
        }
        
        public AssertionError(String message) {
            super(message);
        }
        
        /* not until java 1.4
        public AssertionError(String message, Throwable cause) {
            super(message, cause);
        }
        
        public AssertionError(Throwable cause) {
            super(cause);
        }
        */
    }
    
    public static void assertThat(boolean test, String message) {
        
        if (test == false) {
            throw new AssertionError(message);
        }
    }
    
    public static void assertEquals(Object a, Object b, String message) {
        
        assertThat(a.equals(b), message + "[a.equals(b) failed]");
        assertThat(b.equals(a), message + "[b.equals(a) failed]");
    }
    
    public static void assertNotEquals(Object a, Object b, String message) {
        
        assertThat( !a.equals(b), message + "[not a.equals(b) failed]");
        assertThat( !b.equals(a), message + "[not b.equals(a) failed]");
    }
}

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
rubyfox-server-2.19.2.0 lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java
rubyfox-server-2.17.3.2 lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java
rubyfox-server-2.17.3.1 lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java
rubyfox-server-2.17.3.0 lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java
rubyfox-server-2.16.3.2 lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java
rubyfox-server-2.16.3.1 lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java
rubyfox-server-2.16.0.4 lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java
rubyfox-server-2.16.0.3 lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java
rubyfox-server-2.16.0.2 lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java
rubyfox-server-2.16.0.1 lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java
rubyfox-server-2.16.0.0 lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java
rubyfox-server-2.13.7.3 lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java
rubyfox-server-2.13.6.2 lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java
rubyfox-server-2.13.6.1 lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java
rubyfox-server-2.13.5.1 lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java
rubyfox-server-2.13.4.1 lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java
rubyfox-server-2.13.3.1 lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java
rubyfox-server-2.12.5.1 lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java
rubyfox-server-2.12.5.0 lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java
rubyfox-server-2.12.4.0 lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java