use of joynr.types.Version in project joynr by bmwcarit.
the class VersionCompatibilityCheckerTest method testCallerWithHigherMinorVersionIncompatible.
@Test
public void testCallerWithHigherMinorVersionIncompatible() {
Version caller = new Version(1, 2);
Version provider = new Version(1, 0);
boolean result = subject.check(caller, provider);
assertFalse(result);
}
use of joynr.types.Version in project joynr by bmwcarit.
the class VersionCompatibilityCheckerTest method testCallerIsNull.
@Test(expected = IllegalArgumentException.class)
public void testCallerIsNull() {
Version caller = null;
Version provider = new Version(0, 0);
subject.check(caller, provider);
}
use of joynr.types.Version in project joynr by bmwcarit.
the class VersionCompatibilityCheckerTest method testEqualVersionsAreCompatible.
@Test
public void testEqualVersionsAreCompatible() {
Version caller = new Version(1, 1);
Version provider = new Version(1, 1);
boolean result = subject.check(caller, provider);
assertTrue(result);
}
use of joynr.types.Version in project joynr by bmwcarit.
the class CapabilitiesUtilsTest method testConvertDiscoveryEntryWithMetaInfoToDiscoveryEntry.
@Test
public void testConvertDiscoveryEntryWithMetaInfoToDiscoveryEntry() {
boolean isLocal = true;
DiscoveryEntryWithMetaInfo discoveryEntry = new DiscoveryEntryWithMetaInfo(new Version(42, 23), "testDomain", "testInterfaceName", "testParticipantId", new ProviderQos(), 4711l, 4712l, "testPublicKeyId", isLocal);
DiscoveryEntry convertedEntry = CapabilityUtils.convertToDiscoveryEntry(discoveryEntry);
assertTrue(DiscoveryEntry.class.equals(convertedEntry.getClass()));
compareDiscoveryEntries(isLocal, convertedEntry, discoveryEntry);
}
use of joynr.types.Version in project joynr by bmwcarit.
the class CapabilitiesUtilsTest method testConvertGlobalDiscoveryEntryToDiscoveryEntryWithMetaInfo.
@Test
public void testConvertGlobalDiscoveryEntryToDiscoveryEntryWithMetaInfo() {
boolean isLocal = false;
DiscoveryEntry discoveryEntry = new DiscoveryEntry(new Version(42, 23), "testDomain", "testInterfaceName", "testParticipantId", new ProviderQos(), 4711l, 4712l, "testPublicKeyId");
GlobalDiscoveryEntry globalDiscoveryEntry = CapabilityUtils.discoveryEntry2GlobalDiscoveryEntry(discoveryEntry, new MqttAddress());
DiscoveryEntryWithMetaInfo convertedEntry = CapabilityUtils.convertToDiscoveryEntryWithMetaInfo(isLocal, discoveryEntry);
compareDiscoveryEntries(isLocal, discoveryEntry, convertedEntry);
DiscoveryEntryWithMetaInfo convertedGlobalEntry = CapabilityUtils.convertToDiscoveryEntryWithMetaInfo(isLocal, globalDiscoveryEntry);
compareDiscoveryEntries(isLocal, globalDiscoveryEntry, convertedGlobalEntry);
}
Aggregations