APISonar


org.junit.Assert.assertNotEquals

> org > junit > Assert > assertNotEquals
org APIs junit APIs Assert APIs assertNotEquals APIs

Example 1
public void testClickCoordinates() {
        openTestURL();

        clickFirstButton();
        String eventCoordinates = getFirstLabelValue();
        Assert.assertNotEquals("0,0", eventCoordinates);

        clickSecondButton();
        eventCoordinates = getSecondLabelValue();
        Assert.assertNotEquals("0,0", eventCoordinates);
    }
Example 2
static void notEqualsTest(Object object1, Object object2) {
        Assert.assertNotEquals(object1, object2);
        Assert.assertNotEquals(object2, object1);
    }
Example 3
protected void neq(Object actual, Object unexpected) {
		try {
			Assert.assertNotEquals(unexpected, actual);
		} catch (AssertionError e) {
			registerError(e);
			throw e;
		}
	}
Example 4
static <T extends Comparable<T>> void notCompareToTest(T comparable1, T comparable2) {
        Assert.assertNotEquals(0, comparable1.compareTo(comparable2));
        Assert.assertNotEquals(0, comparable2.compareTo(comparable1));
    }
Example 5
private void assertRegisterChanged(char registerName) {
    String registerText = getRegisterText(registerName);
    Assert.assertNotEquals(DUMMY_TEXT, registerText);
  }
Example 6
public void testDifferentFPs() {
        String fp1 = reg.getFingerprint(schema1);
        String fp2 = reg.getFingerprint(schema2);

        Assert.assertNotEquals(fp1, fp2);
    }
Example 7
public void testInfluxdbEmitterConfigObjectsAreDifferent() throws IOException
  {
    InfluxdbEmitterConfig influxdbEmitterConfigComparison = new InfluxdbEmitterConfig(
        "localhost",
        8080,
        "dbname",
        10000,
        15000,
        30000,
        "adam",
        "password",
        null
    );
    Assert.assertNotEquals(influxdbEmitterConfig, influxdbEmitterConfigComparison);
  }
Example 8
private void assertNotMatchesSmallHeight(int firstSlotHeight, int i,
            String id) {
        Assert.assertNotEquals(
                "Big slot '" + id + "' matched small slots in height",
                firstSlotHeight, getSlotHeight(i));
    }
Example 9
public void testQuery() {
        Queue queue = insertOne();
        //query
        List<Queue> queues = queueMapper.selectList(null);
        Assert.assertNotEquals(queues.size(), 0);
        queueMapper.deleteById(queue.getId());
    }
Example 10
public void testQuery() {
        Resource resource = insertOne();
        //query
        List<Resource> resources = resourceMapper.selectList(null);
        Assert.assertNotEquals(resources.size(), 0);
        resourceMapper.deleteById(resource.getId());
    }
Example 11
public int foo(A a) {
        Assert.assertNotEquals("a cannot be null, because a field of a is accessed before the call", a, null);
        return 42;
    }
Example 12
public void testGetErrorStack() {

    Throwable e = new Throwable();
    FortifyUtils.getErrorStack(e);
    Assert.assertNotEquals(true, FortifyUtils.getErrorStack(e));
  }
Example 13
public void testEncryptDifferent() {
        String o1 = service.encrypt("hello", 10);
        String o2 = service.encrypt("hello", 10);
        Assert.assertNotEquals(o1, o2);
    }
Example 14
public void testQueryDataSourceByName() {
        DataSource dataSource = insertOne();
        List<DataSource> dataSources = dataSourceMapper.queryDataSourceByName("data source test");
        Assert.assertNotEquals(dataSources.size(), 0);
        dataSourceMapper.deleteById(dataSource.getId());
    }
Example 15
public void testNotEquals() {
    DirtyState dirtyState = new DirtyState();

    Assert.assertNotEquals(dirtyState, new Object());

    DirtyState differentState = new DirtyState();
    differentState.beforeCommit();
    Assert.assertNotEquals(dirtyState, differentState);
    Assert.assertNotEquals(dirtyState.hashCode(), differentState.hashCode());
  }
Example 16
public void testGetUUID() {
        String id1 = Util.getUUID();
        String id2 = Util.getUUID();
        System.out.println("uuid = " + id1);
        System.out.println("uuid = " + id2);
        Assert.assertNotEquals(id1, id2);
    }
Example 17
public void testRunProcess() throws IOException, InterruptedException {
    ArrayList<String> result =
        Utils.runProcess("/bin/bash", "-c", "ls");
    Assert.assertNotEquals(result.size(), 0);
  }
Example 18
public void findUpAll() {
        List<ProductInfo> productInfoList=productService.findUpAll();
        Assert.assertNotEquals(0,productInfoList.size());
    }
Example 19
private void assertTextNotEquals(String id, String notExpected) {
        String actual = getLabelText(id);
        Assert.assertNotEquals(String.format("Unexpected value for '%s'", id),
                notExpected, actual);
    }
Example 20
public void testNotEquals() {
    MetricsMap<String, AtomicLong> metricsMap = new MetricsMap<>(unusedKey -> new AtomicLong());

    Assert.assertNotEquals(metricsMap, new Object());

    MetricsMap<String, AtomicLong> differentMetrics =
        new MetricsMap<>(unusedKey -> new AtomicLong());
    differentMetrics.get("key");
    Assert.assertNotEquals(metricsMap, differentMetrics);
    Assert.assertNotEquals(metricsMap.hashCode(), differentMetrics.hashCode());
  }
Example 21
public void findByCategoryTypeIn() {
        List<ProductCategory> productCategoryList=categoryService.findByCategoryTypeIn(Arrays.asList(2,3,4));
        Assert.assertNotEquals(0,productCategoryList.size());
    }
Example 22
public void scale2_english() {
        
        // when
        final BigDecimal actual = converter.convertToObject("123.45", Locale.ENGLISH);
        Assert.assertEquals(bd_123_4500_scale2, actual);
        Assert.assertEquals(bd_123_45_scale2, actual);
        
        Assert.assertNotEquals(bd_123_4500_scale4, actual);
        Assert.assertNotEquals(bd_123_45_scale4, actual);

        // when
        String actualStr = converter.convertToString(actual, Locale.ENGLISH);
        Assert.assertEquals("123.45", actualStr);
    }
Example 23
public void findByOwnerId() {
        List<CommentsInfoDTO> result = service.findByOwnerId("1541062468073593543");
        Assert.assertNotEquals(0, result.size());
    }
Example 24
public void testGetLock() throws Exception {
    Long offset_1 = 1L;
    Long offset_2 = 2L;
    ReentrantReadWriteLock offsetLock_1 = idLock.getLock(offset_1);
    ReentrantReadWriteLock offsetLock_2 = idLock.getLock(offset_1);
    Assert.assertEquals(offsetLock_1,offsetLock_2);
    ReentrantReadWriteLock offsetLock_3 = idLock.getLock(offset_2);
    Assert.assertNotEquals(offsetLock_1,offsetLock_3);
  }
Example 25
public void testToString() {
        streams.start();
        final String streamString = streams.toString();
        streams.close();
        final String appId = streamString.split("\\n")[1].split(":")[1].trim();
        Assert.assertNotEquals("streamString should not be empty", "", streamString);
        Assert.assertNotNull("streamString should not be null", streamString);
        Assert.assertNotEquals("streamString contains non-empty appId", "", appId);
        Assert.assertNotNull("streamString contains non-null appId", appId);
    }