Search in sources :

Example 6 with IpVersion

use of org.ovirt.engine.api.model.IpVersion in project ovirt-engine by oVirt.

the class IpHelperTest method testReturnsV6WhenGivenValidV6Address.

/**
 * Checks that when the version isn't given explicitly, and the address is a valid IPv6 address, the returned
 * version is IPv6.
 */
@Test
public void testReturnsV6WhenGivenValidV6Address() {
    Ip ip = new Ip();
    ip.setAddress("::1");
    IpVersion version = IpHelper.getVersion(ip);
    assertEquals(IpVersion.V6, version);
}
Also used : IpVersion(org.ovirt.engine.api.model.IpVersion) Ip(org.ovirt.engine.api.model.Ip) Test(org.junit.Test)

Aggregations

IpVersion (org.ovirt.engine.api.model.IpVersion)6 Test (org.junit.Test)5 Ip (org.ovirt.engine.api.model.Ip)5 ArrayList (java.util.ArrayList)1 VmGuestAgentInterface (org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface)1