APISonar


org.junit.Assert.assertNull

> org > junit > Assert > assertNull
org APIs junit APIs Assert APIs assertNull APIs

Example 1
public void testCreateAnonResourceWithNull()
	{
		final Resource r = model.createResource((String) null);
		Assert.assertTrue(r.isAnon());
		Assert.assertNull(r.getURI());
		Assert.assertNull(r.getNameSpace());
		Assert.assertNull(r.getLocalName());
	}
Example 2
protected void assertNull(String message, Object object) {
    checkThread();
    try {
      Assert.assertNull(message, object);
    } catch (AssertionError e) {
      handleThrowable(e);
    }
  }
Example 3
private void allNull(final Container container) {
        Assert.assertNull(container.lazyMapRef);
        Assert.assertNull(container.singleRef);
        Assert.assertNull(container.lazySingleRef);
        Assert.assertNull(container.collectionRef);
        Assert.assertNull(container.lazyCollectionRef);
        Assert.assertNull(container.mapRef);
    }
Example 4
protected void isNull(Object value) {
		try {
			Assert.assertNull(value);
		} catch (AssertionError e) {
			registerError(e);
			throw e;
		}
	}
Example 5
public void testAcceptedReceiveUpdateEventWithSourceFiltered() {
        State state = createState("true");
        Event updateEvent = createUpdateEvent(ITEM_NAME_TEST, state, TEST_SOURCE);
        getSourceFilterList().add(TEST_SOURCE);

        super.handleEvent(updateEvent);

        Assert.assertNull(this.itemName);
        Assert.assertNull(this.command);
        Assert.assertNull(this.newState);
    }
Example 6
protected void assertSzNull(Style s) {
		
		if (s.getRPr()==null) {
			
		} else if (s.getRPr()!=null) {
			
			Assert.assertNull(s.getRPr().getSz());
		}
		
	}
Example 7
public void threadAssertNull(Object x) {
        try {
            Assert.assertNull(x);
        } catch (AssertionFailedError t) {
            threadRecordFailure(t);
            throw t;
        }
    }
Example 8
public void testGetNextDatasetWithNull() {
    String currentDataset = mfDatasetInputSplit.getNextDataset();
    Assert.assertNull(currentDataset);
  }
Example 9
public void should_equal_serializer_success_time_is_null() {
        Node flow = new Node("/flow", "flow");
        String json = flow.toJson();
        Node f = Node.parse(json, Node.class);
        Assert.assertNull(flow.getCreatedAt());
        Assert.assertNull(flow.getUpdatedAt());
        Assert.assertNull(f.getUpdatedAt());
        Assert.assertNull(f.getCreatedAt());
    }
Example 10
public void testGetFisrtKeyInEmptyTree() throws Exception {
    Integer result = sbTree.firstKey();

    Assert.assertNull(result);
  }
Example 11
static void setRun(Class<?> cls) {
        Assert.assertNull(run);
        run = cls;
    }
Example 12
public void testGetNonnexistentValue() {
		String value = _settings.getValue("nonexistentName", null);

		Assert.assertNull(value);
	}
Example 13
public void testResolveClass() {

    String pid = runtimeService.startProcessInstanceByKey("testResolveVariable").getId();

    waitForJobExecutorToProcessAllJobs();

    Assert.assertNull(runtimeService.createProcessInstanceQuery().processInstanceId(pid).singleResult());

  }
Example 14
public void testNonExistantParameter() {
        Parameters p = new Parameters();

        String value = p.getParameter("foo");
        Assert.assertNull(value);

        Enumeration<String> names = p.getParameterNames();
        Assert.assertFalse(names.hasMoreElements());

        String[] values = p.getParameterValues("foo");
        Assert.assertNull(values);
    }
Example 15
public void allNonPrimitiveNulls() throws IOException {
		byte[] input = "{\"b\":null,\"s\":null,\"i\":null,\"l\":null,\"d\":null,\"f\":null}".getBytes("UTF-8");
		NonPrimitiveNulls z = dslJsonFull.deserialize(NonPrimitiveNulls.class, input, input.length);
		Assert.assertNull(z.b);
		Assert.assertNull(z.s);
		Assert.assertNull(z.i);
		Assert.assertNull(z.l);
		Assert.assertNull(z.d);
		Assert.assertNull(z.f);
	}
Example 16
public void findRoleTestIdNegative() {
        Role returnedRole = roleManagerImpl.findRole(-1l);
        Assert.assertNull(returnedRole);
    }
Example 17
public void getFirstAndLastOnEmpty()
    {
        List<?> list = new ArrayList<>();
        Assert.assertNull(ListIterate.getFirst(list));
        Assert.assertNull(ListIterate.getLast(list));

        List<?> linked = new LinkedList<>();
        Assert.assertNull(ListIterate.getFirst(linked));
        Assert.assertNull(ListIterate.getLast(linked));

        List<?> synchronizedList = Collections.synchronizedList(linked);
        Assert.assertNull(ListIterate.getFirst(synchronizedList));
        Assert.assertNull(ListIterate.getLast(synchronizedList));
    }
Example 18
public void cleanColumnInputNullOutputNull() {

    // Arrange
    final String column = null;

    // Act
    final String actual = Util.cleanColumn(column);

    // Assert result
    Assert.assertNull(actual);
  }
Example 19
public void testOperator_minusNull() {
		Number x = null;

		BigDecimal result = NumberExtensions.operator_minus(x);

		Assert.assertNull(result);
	}
Example 20
public void getClassName_noName() {
    Assert.assertNull(SwaggerUtils.getClassName(null));

    Map<String, Object> vendorExtensions = new HashMap<>();
    Assert.assertNull(SwaggerUtils.getClassName(vendorExtensions));
  }
Example 21
public void whenFindNonExistingFunction_thenReturnNull() {
		Function function = lazyFunctions.find("nonExistingFunction", new Class<?>[0]);

		Assert.assertNull(function);
	}
Example 22
public void emptyTag() {
        // JSoup parses empty tags into text nodes
        Component c = readDesign("<>foo</>");
        Assert.assertNull(c);
    }
Example 23
public void testObjectArraySetWithNull() {
        String[] array = new String[]{
                        "a",
                        "b",
                        "c",
                        "d"
        };

        Array.set(array, 0, null);

        Assert.assertNull(array[0]);
        Assert.assertEquals("b", array[1]);
        Assert.assertEquals("c", array[2]);
        Assert.assertEquals("d", array[3]);
    }
Example 24
public void testContext() {

    Map<String, String> context = null;
    requestHeader.setContext(context);
    Assert.assertNull(requestHeader.getContext());
  }
Example 25
public void getFirstAndLastOnEmpty()
    {
        Object[] objectArray = {};
        Assert.assertNull(ArrayIterate.getFirst(objectArray));
        Assert.assertNull(ArrayIterate.getLast(objectArray));
    }