use of com.cloud.utils.nio.Link in project cloudstack by apache.
the class ConnectedAgentAttacheTest method testEquals.
@Test
public void testEquals() throws Exception {
Link link = mock(Link.class);
ConnectedAgentAttache agentAttache1 = new ConnectedAgentAttache(null, 0, null, link, false);
ConnectedAgentAttache agentAttache2 = new ConnectedAgentAttache(null, 0, null, link, false);
assertTrue(agentAttache1.equals(agentAttache2));
}
use of com.cloud.utils.nio.Link in project cloudstack by apache.
the class ConnectedAgentAttacheTest method testEqualsFalseDiffId.
@Test
public void testEqualsFalseDiffId() throws Exception {
Link link1 = mock(Link.class);
ConnectedAgentAttache agentAttache1 = new ConnectedAgentAttache(null, 1, null, link1, false);
ConnectedAgentAttache agentAttache2 = new ConnectedAgentAttache(null, 2, null, link1, false);
assertFalse(agentAttache1.equals(agentAttache2));
}
use of com.cloud.utils.nio.Link in project cosmic by MissionCriticalCloud.
the class ConnectedAgentAttacheTest method testEqualsFalseDiffClass.
@Test
public void testEqualsFalseDiffClass() throws Exception {
final Link link1 = mock(Link.class);
final ConnectedAgentAttache agentAttache1 = new ConnectedAgentAttache(null, 1, null, link1, false);
assertFalse(agentAttache1.equals("abc"));
}
use of com.cloud.utils.nio.Link in project cosmic by MissionCriticalCloud.
the class ConnectedAgentAttacheTest method testEquals.
@Test
public void testEquals() throws Exception {
final Link link = mock(Link.class);
final ConnectedAgentAttache agentAttache1 = new ConnectedAgentAttache(null, 0, null, link, false);
final ConnectedAgentAttache agentAttache2 = new ConnectedAgentAttache(null, 0, null, link, false);
assertTrue(agentAttache1.equals(agentAttache2));
}
use of com.cloud.utils.nio.Link in project cosmic by MissionCriticalCloud.
the class ConnectedAgentAttacheTest method testEqualsFalseDiffLink.
@Test
public void testEqualsFalseDiffLink() throws Exception {
final Link link1 = mock(Link.class);
final Link link2 = mock(Link.class);
final ConnectedAgentAttache agentAttache1 = new ConnectedAgentAttache(null, 0, null, link1, false);
final ConnectedAgentAttache agentAttache2 = new ConnectedAgentAttache(null, 0, null, link2, false);
assertFalse(agentAttache1.equals(agentAttache2));
}
Aggregations