Search in sources :

Example 11 with ErrCode

use of org.aion.precompiled.contracts.ATB.ErrCode in project aion by aionnetwork.

the class BridgeControllerRingTest method testRingRemoveNonExistingMember.

@Test
public void testRingRemoveNonExistingMember() {
    ErrCode code = this.controller.ringRemoveMember(OWNER_ADDR.toByteArray(), memberAddress);
    assertThat(code).isEqualTo(ErrCode.RING_MEMBER_NOT_EXISTS);
}
Also used : ErrCode(org.aion.precompiled.contracts.ATB.ErrCode) Test(org.junit.Test)

Example 12 with ErrCode

use of org.aion.precompiled.contracts.ATB.ErrCode in project aion by aionnetwork.

the class BridgeControllerRingTest method testRingRemoveMemberNotOwner.

@Test
public void testRingRemoveMemberNotOwner() {
    ErrCode code = this.controller.ringRemoveMember(CONTRACT_ADDR.toByteArray(), memberAddress);
    assertThat(code).isEqualTo(ErrCode.NOT_OWNER);
}
Also used : ErrCode(org.aion.precompiled.contracts.ATB.ErrCode) Test(org.junit.Test)

Example 13 with ErrCode

use of org.aion.precompiled.contracts.ATB.ErrCode in project aion by aionnetwork.

the class BridgeControllerRingTest method testRingAddMember.

@Test
public void testRingAddMember() {
    ErrCode code = this.controller.ringAddMember(OWNER_ADDR.toByteArray(), memberAddress);
    assertThat(code).isEqualTo(ErrCode.NO_ERROR);
}
Also used : ErrCode(org.aion.precompiled.contracts.ATB.ErrCode) Test(org.junit.Test)

Example 14 with ErrCode

use of org.aion.precompiled.contracts.ATB.ErrCode in project aion by aionnetwork.

the class BridgeControllerRingTest method testRingAddMemberNotOwner.

@Test
public void testRingAddMemberNotOwner() {
    ErrCode code = this.controller.ringAddMember(CONTRACT_ADDR.toByteArray(), memberAddress);
    assertThat(code).isEqualTo(ErrCode.NOT_OWNER);
}
Also used : ErrCode(org.aion.precompiled.contracts.ATB.ErrCode) Test(org.junit.Test)

Example 15 with ErrCode

use of org.aion.precompiled.contracts.ATB.ErrCode in project aion by aionnetwork.

the class BridgeControllerRingTest method testRingReinitialization.

@Test
public void testRingReinitialization() {
    ErrCode code = this.controller.ringInitialize(OWNER_ADDR.toByteArray(), getMemberAddress(members));
    assertThat(code).isEqualTo(ErrCode.RING_LOCKED);
}
Also used : ErrCode(org.aion.precompiled.contracts.ATB.ErrCode) Test(org.junit.Test)

Aggregations

ErrCode (org.aion.precompiled.contracts.ATB.ErrCode)19 Test (org.junit.Test)18 BridgeController (org.aion.precompiled.contracts.ATB.BridgeController)6 BridgeTransfer (org.aion.precompiled.contracts.ATB.BridgeTransfer)5 AionAddress (org.aion.types.AionAddress)4 Log (org.aion.types.Log)1