Search in sources :

Example 71 with Any

use of com.google.protobuf.Any in project core-java by SpineEventEngine.

the class FloatMismatch method unpackExpected.

/**
     * Obtains expected float value from the passed mismatch.
     *
     * @throws RuntimeException if the passed instance represent a mismatch of non-float values
     */
public static float unpackExpected(ValueMismatch mismatch) {
    checkNotNull(mismatch);
    final Any expected = mismatch.getExpected();
    return unpacked(expected);
}
Also used : Any(com.google.protobuf.Any)

Example 72 with Any

use of com.google.protobuf.Any in project core-java by SpineEventEngine.

the class IntMismatch method unpackExpected.

/**
     * Obtains expected int value from the passed mismatch.
     *
     * @throws RuntimeException if the passed instance represent a mismatch of non-int values
     */
public static int unpackExpected(ValueMismatch mismatch) {
    checkNotNull(mismatch);
    final Any expected = mismatch.getExpected();
    return unpacked(expected);
}
Also used : Any(com.google.protobuf.Any)

Example 73 with Any

use of com.google.protobuf.Any in project core-java by SpineEventEngine.

the class IntMismatch method unpackActual.

/**
     * Obtains actual int value from the passed mismatch.
     *
     * @throws RuntimeException if the passed instance represent a mismatch of non-int values
     */
public static int unpackActual(ValueMismatch mismatch) {
    checkNotNull(mismatch);
    final Any actual = mismatch.getActual();
    return unpacked(actual);
}
Also used : Any(com.google.protobuf.Any)

Example 74 with Any

use of com.google.protobuf.Any in project core-java by SpineEventEngine.

the class BooleanMismatch method unpackNewValue.

/**
     * Obtains new boolean value from the passed mismatch.
     *
     * @throws RuntimeException if the passed instance represent a mismatch of non-boolean values
     */
public static boolean unpackNewValue(ValueMismatch mismatch) {
    checkNotNull(mismatch);
    final Any newValue = mismatch.getNewValue();
    return unpacked(newValue);
}
Also used : Any(com.google.protobuf.Any)

Example 75 with Any

use of com.google.protobuf.Any in project core-java by SpineEventEngine.

the class BooleanMismatch method unpackExpected.

/**
     * Obtains expected boolean value from the passed mismatch.
     *
     * @throws RuntimeException if the passed instance represent a mismatch of non-boolean values
     */
public static boolean unpackExpected(ValueMismatch mismatch) {
    checkNotNull(mismatch);
    final Any expected = mismatch.getExpected();
    return unpacked(expected);
}
Also used : Any(com.google.protobuf.Any)

Aggregations

Any (com.google.protobuf.Any)117 Test (org.junit.Test)40 Message (com.google.protobuf.Message)25 EntityRecord (io.spine.server.entity.EntityRecord)19 Version (io.spine.base.Version)13 Customer (io.spine.test.commandservice.customer.Customer)13 TypeUrl (io.spine.type.TypeUrl)13 StandStorage (io.spine.server.stand.StandStorage)12 Query (io.spine.client.Query)10 TenantAwareTest (io.spine.server.tenant.TenantAwareTest)10 CustomerId (io.spine.test.commandservice.customer.CustomerId)10 Map (java.util.Map)8 FieldMask (com.google.protobuf.FieldMask)7 EntityFilters (io.spine.client.EntityFilters)7 EntityId (io.spine.client.EntityId)7 Target (io.spine.client.Target)7 Maps.newHashMap (com.google.common.collect.Maps.newHashMap)6 Identifiers.idToAny (io.spine.base.Identifiers.idToAny)6 QueryResponse (io.spine.client.QueryResponse)6 EntityIdFilter (io.spine.client.EntityIdFilter)5