use of org.quiltmc.launchermeta.version.v1.Version in project java-dialogflow-cx by googleapis.
the class ITSystemTest method updateVersionTest.
@Test
public void updateVersionTest() {
Version version = Version.newBuilder().setName(versionName).setDisplayName(DISPLAY_NAME).setState(Version.State.SUCCEEDED).build();
FieldMask updateMask = FieldMask.newBuilder().build();
UpdateVersionRequest versionRequest = UpdateVersionRequest.newBuilder().setVersion(version).setUpdateMask(updateMask).build();
Version updatedVersion = versionsClient.updateVersion(versionRequest);
assertEquals(Version.State.SUCCEEDED, updatedVersion.getState());
}
use of org.quiltmc.launchermeta.version.v1.Version in project java-dialogflow-cx by googleapis.
the class ITSystemTest method listVersionsTest.
@Test
public void listVersionsTest() {
ListVersionsRequest versionsRequest = ListVersionsRequest.newBuilder().setParent(flowName).build();
VersionsClient.ListVersionsPagedResponse pagedListResponse = versionsClient.listVersions(versionsRequest);
List<Version> versions = Lists.newArrayList(pagedListResponse.iterateAll());
boolean isVersionNameExists = false;
for (Version version : versions) {
if (version.getName().equals(versionName)) {
assertVersionDetails(version);
isVersionNameExists = true;
}
}
assertTrue(isVersionNameExists);
}
use of org.quiltmc.launchermeta.version.v1.Version in project java-dialogflow-cx by googleapis.
the class ITSystemTest method getVersionTest.
@Test
public void getVersionTest() {
GetVersionRequest versionRequest = GetVersionRequest.newBuilder().setName(versionName).build();
Version version = versionsClient.getVersion(versionRequest);
assertVersionDetails(version);
}
use of org.quiltmc.launchermeta.version.v1.Version in project dcache by dCache.
the class DCapDoorInterpreterV3Tests method versionShouldMatchTo.
@Test
public void versionShouldMatchTo() {
Version v1_2 = new Version(1, 2);
Version v1_1 = new Version(1, 1);
Version v2_1 = new Version(2, 1);
Version v1_1_1 = new Version(1, 1, 1, null);
Version v1_1_2 = new Version(1, 1, 2, null);
Version v1_1_1_1 = new Version(1, 1, 1, "1");
Version v1_1_1_2 = new Version(1, 1, 1, "2");
assertThat(v1_1.matches(v1_1), is(equalTo(0)));
assertThat(v1_2.matches(v1_2), is(equalTo(0)));
assertThat(v2_1.matches(v2_1), is(equalTo(0)));
assertThat(v1_1_1.matches(v1_1_1), is(equalTo(0)));
assertThat(v1_1_2.matches(v1_1_2), is(equalTo(0)));
assertThat(v1_1_1_1.matches(v1_1_1_1), is(equalTo(0)));
assertThat(v1_1_1_2.matches(v1_1_1_2), is(equalTo(0)));
assertThat(v1_1.matches(v1_1_1), is(equalTo(0)));
assertThat(v1_1.matches(v1_1_1_1), is(equalTo(0)));
assertThat(v1_1_1.matches(v1_1_1_1), is(equalTo(0)));
assertThat(v1_1.matches(v1_2), is(equalTo(-1)));
assertThat(v1_2.matches(v1_1), is(equalTo(1)));
assertThat(v1_1.matches(v1_2), is(equalTo(-1)));
assertThat(v2_1.matches(v1_1), is(equalTo(1)));
assertThat(v1_2.matches(v2_1), is(equalTo(-1)));
assertThat(v2_1.matches(v1_2), is(equalTo(1)));
assertThat(v1_1_1.matches(v1_1), is(equalTo(1)));
assertThat(v1_1_1.matches(v1_1_2), is(equalTo(-1)));
assertThat(v1_1_2.matches(v1_1_1), is(equalTo(1)));
assertThat(v1_1_1_1.matches(v1_1_1), is(equalTo(1)));
assertThat(v1_1_1_1.matches(v1_1_1_2), is(equalTo(-1)));
assertThat(v1_1_1_2.matches(v1_1_1_1), is(equalTo(1)));
}
use of org.quiltmc.launchermeta.version.v1.Version in project dcache by dCache.
the class DCapDoorInterpreterV3Tests method versionShouldConstructFromString.
@Test
public void versionShouldConstructFromString() {
assertThat(new Version("1.2"), is(equalTo(new Version(1, 2))));
assertThat(new Version("1.2.3"), is(equalTo(new Version(1, 2, 3, null))));
assertThat(new Version("1.2.3-4"), is(equalTo(new Version(1, 2, 3, "4"))));
}
Aggregations