Java Assert Null assertNull(String string, Object obj)

Here you can find the source of assertNull(String string, Object obj)

Description

assert Null

License

Apache License

Declaration

public static void assertNull(String string, Object obj) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static void assertNull(String string, Object obj) {
        assertTrue(string, obj == null);
    }/*from w ww  .j  a  v  a  2s  .c  o m*/

    public static void assertTrue(String string, boolean b) {
        if (!b)
            throw new IllegalStateException(string);
    }
}

Related

  1. assertNull(Object object, String errMsg)
  2. assertNull(Object object, String message)
  3. assertNull(String message, Object object)
  4. assertNull(String message, Object object)
  5. assertNull(String message, Object val)
  6. assertObjectNullOrIsInstance(Object obj, Class expectedType, String name)