Search in sources :

Example 1 with GridBinaryTestClass1

use of org.apache.ignite.internal.binary.test.GridBinaryTestClass1 in project ignite by apache.

the class BinaryBasicNameMapperSelfTest method testSimpleName.

/**
 * @throws Exception If failed.
 */
@Test
public void testSimpleName() throws Exception {
    BinaryBasicNameMapper mapper = new BinaryBasicNameMapper(true);
    assertEquals("GridBinaryTestClass1", mapper.typeName(GridBinaryTestClass1.class.getName()));
    assertEquals("InnerClass", mapper.typeName(GridBinaryTestClass1.class.getName() + "$InnerClass"));
}
Also used : BinaryBasicNameMapper(org.apache.ignite.binary.BinaryBasicNameMapper) GridBinaryTestClass1(org.apache.ignite.internal.binary.test.GridBinaryTestClass1) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest) Test(org.junit.Test)

Example 2 with GridBinaryTestClass1

use of org.apache.ignite.internal.binary.test.GridBinaryTestClass1 in project ignite by apache.

the class BinaryBasicIdMapperSelfTest method testDefaultCase.

/**
 * @throws Exception If failed.
 */
@Test
public void testDefaultCase() throws Exception {
    BinaryBasicIdMapper mapper = new BinaryBasicIdMapper(false);
    assertEquals(GridBinaryTestClass1.class.getName().hashCode(), mapper.typeId(GridBinaryTestClass1.class.getName()));
    assertEquals((GridBinaryTestClass1.class.getName() + "$InnerClass").hashCode(), mapper.typeId(GridBinaryTestClass1.class.getName() + "$InnerClass"));
}
Also used : BinaryBasicIdMapper(org.apache.ignite.binary.BinaryBasicIdMapper) GridBinaryTestClass1(org.apache.ignite.internal.binary.test.GridBinaryTestClass1) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest) Test(org.junit.Test)

Example 3 with GridBinaryTestClass1

use of org.apache.ignite.internal.binary.test.GridBinaryTestClass1 in project ignite by apache.

the class BinaryBasicIdMapperSelfTest method testLowerCase.

/**
 * @throws Exception If failed.
 */
@Test
public void testLowerCase() throws Exception {
    BinaryBasicIdMapper mapper = new BinaryBasicIdMapper(true);
    assertEquals(GridBinaryTestClass1.class.getName().toLowerCase().hashCode(), mapper.typeId(GridBinaryTestClass1.class.getName()));
    assertEquals((GridBinaryTestClass1.class.getName() + "$InnerClass").toLowerCase().hashCode(), mapper.typeId(GridBinaryTestClass1.class.getName() + "$InnerClass"));
}
Also used : BinaryBasicIdMapper(org.apache.ignite.binary.BinaryBasicIdMapper) GridBinaryTestClass1(org.apache.ignite.internal.binary.test.GridBinaryTestClass1) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest) Test(org.junit.Test)

Example 4 with GridBinaryTestClass1

use of org.apache.ignite.internal.binary.test.GridBinaryTestClass1 in project ignite by apache.

the class BinaryBasicNameMapperSelfTest method testFullName.

/**
 * @throws Exception If failed.
 */
@Test
public void testFullName() throws Exception {
    BinaryBasicNameMapper mapper = new BinaryBasicNameMapper(false);
    assertEquals(GridBinaryTestClass1.class.getName(), mapper.typeName(GridBinaryTestClass1.class.getName()));
    assertEquals(GridBinaryTestClass1.class.getName() + "$InnerClass", mapper.typeName(GridBinaryTestClass1.class.getName() + "$InnerClass"));
}
Also used : BinaryBasicNameMapper(org.apache.ignite.binary.BinaryBasicNameMapper) GridBinaryTestClass1(org.apache.ignite.internal.binary.test.GridBinaryTestClass1) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest) Test(org.junit.Test)

Aggregations

GridBinaryTestClass1 (org.apache.ignite.internal.binary.test.GridBinaryTestClass1)4 GridCommonAbstractTest (org.apache.ignite.testframework.junits.common.GridCommonAbstractTest)4 Test (org.junit.Test)4 BinaryBasicIdMapper (org.apache.ignite.binary.BinaryBasicIdMapper)2 BinaryBasicNameMapper (org.apache.ignite.binary.BinaryBasicNameMapper)2