Search in sources :

Example 11 with Version

use of com.google.cloud.dialogflow.cx.v3beta1.Version in project dcache by dCache.

the class DCapDoorInterpreterV3Tests method versionShouldEqual.

@Test
public void versionShouldEqual() {
    Version v1_2 = new Version(1, 2);
    Version v1_1 = new Version(1, 1);
    Version v2_2 = new Version(2, 2);
    Version v1_1_1 = new Version(1, 1, 1, null);
    Version v1_1_1_1 = new Version(1, 1, 1, "1");
    assertThat(v1_1, is(equalTo(v1_1)));
    assertThat(v1_2, is(equalTo(v1_2)));
    assertThat(v2_2, is(equalTo(v2_2)));
    assertThat(v1_1_1, is(equalTo(v1_1_1)));
    assertThat(v1_1_1_1, is(equalTo(v1_1_1_1)));
    assertThat(new Version(1, 1), is(equalTo(v1_1)));
    assertThat(new Version(1, 2), is(equalTo(v1_2)));
    assertThat(new Version(2, 2), is(equalTo(v2_2)));
    assertThat(new Version(1, 1, 1, null), is(equalTo(v1_1_1)));
    assertThat(new Version(1, 1, 1, "1"), is(equalTo(v1_1_1_1)));
    assertThat(v1_1, not(equalTo(v1_2)));
    assertThat(v1_2, not(equalTo(v1_1)));
    assertThat(v2_2, not(equalTo(v1_2)));
    assertThat(v1_2, not(equalTo(v2_2)));
    assertThat(v2_2, not(equalTo(v1_1)));
    assertThat(v1_1, not(equalTo(v2_2)));
    assertThat(v1_1, is(not(equalTo(v1_1_1))));
    assertThat(v1_1_1, is(not(equalTo(v1_1))));
    assertThat(v1_1, is(not(equalTo(v1_1_1_1))));
    assertThat(v1_1_1_1, is(not(equalTo(v1_1))));
    assertThat(v1_1_1, is(not(equalTo(v1_1_1_1))));
    assertThat(v1_1_1_1, is(not(equalTo(v1_1_1))));
}
Also used : Version(diskCacheV111.doors.DCapDoorInterpreterV3.Version) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)8 Version (com.google.cloud.dialogflow.cx.v3beta1.Version)4 Version (diskCacheV111.doors.DCapDoorInterpreterV3.Version)3 ListVersionsPagedResponse (com.google.cloud.dialogflow.cx.v3beta1.VersionsClient.ListVersionsPagedResponse)2 AbstractMessage (com.google.protobuf.AbstractMessage)2 Agent (com.google.cloud.dialogflow.cx.v3beta1.Agent)1 CreateEntityTypeRequest (com.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest)1 CreateFlowRequest (com.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest)1 CreateIntentRequest (com.google.cloud.dialogflow.cx.v3beta1.CreateIntentRequest)1 CreatePageRequest (com.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest)1 CreateTransitionRouteGroupRequest (com.google.cloud.dialogflow.cx.v3beta1.CreateTransitionRouteGroupRequest)1 CreateVersionRequest (com.google.cloud.dialogflow.cx.v3beta1.CreateVersionRequest)1 DeleteAgentRequest (com.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest)1 DeleteEntityTypeRequest (com.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest)1 DeleteFlowRequest (com.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest)1 DeleteIntentRequest (com.google.cloud.dialogflow.cx.v3beta1.DeleteIntentRequest)1 DeletePageRequest (com.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest)1 DeleteTransitionRouteGroupRequest (com.google.cloud.dialogflow.cx.v3beta1.DeleteTransitionRouteGroupRequest)1 DeleteVersionRequest (com.google.cloud.dialogflow.cx.v3beta1.DeleteVersionRequest)1 EntityType (com.google.cloud.dialogflow.cx.v3beta1.EntityType)1