Search in sources :

Example 1 with MemberImplConstructor

use of com.hazelcast.test.starter.constructor.MemberImplConstructor in project hazelcast by hazelcast.

the class MemberImplConstructorTest method testConstructor.

@Test
public void testConstructor() {
    HazelcastInstance hz = createHazelcastInstance();
    MemberImpl memberImpl = (MemberImpl) hz.getCluster().getLocalMember();
    MemberImplConstructor constructor = new MemberImplConstructor(MemberImpl.class);
    MemberImpl clonedMemberImpl = (MemberImpl) constructor.createNew(memberImpl);
    assertEquals(memberImpl.localMember(), clonedMemberImpl.localMember());
    assertEquals(memberImpl.isLiteMember(), clonedMemberImpl.isLiteMember());
    assertEquals(memberImpl.getAddress(), clonedMemberImpl.getAddress());
    assertEquals(memberImpl.getSocketAddress(), clonedMemberImpl.getSocketAddress());
    assertEquals(memberImpl.getUuid(), clonedMemberImpl.getUuid());
    assertEquals(memberImpl.getAttributes(), clonedMemberImpl.getAttributes());
    assertEquals(memberImpl.getVersion(), clonedMemberImpl.getVersion());
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) MemberImpl(com.hazelcast.cluster.impl.MemberImpl) MemberImplConstructor(com.hazelcast.test.starter.constructor.MemberImplConstructor) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

MemberImpl (com.hazelcast.cluster.impl.MemberImpl)1 HazelcastInstance (com.hazelcast.core.HazelcastInstance)1 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 MemberImplConstructor (com.hazelcast.test.starter.constructor.MemberImplConstructor)1 Test (org.junit.Test)1