Search in sources :

Example 1 with RoomMemberCountCondition

use of org.matrix.androidsdk.rest.model.bingrules.RoomMemberCountCondition in project matrix-android-sdk by matrix-org.

the class ConditionDeserializerTest method testRoomMemberCountCondition.

@Test
public void testRoomMemberCountCondition() {
    String conditionJson = "{'kind': 'room_member_count', 'is': 'is1'}";
    Condition condition = gson.fromJson(conditionJson, Condition.class);
    assertTrue(condition instanceof RoomMemberCountCondition);
    RoomMemberCountCondition roomMemberCountConditionCondition = (RoomMemberCountCondition) condition;
    assertEquals("is1", roomMemberCountConditionCondition.is);
}
Also used : EventMatchCondition(org.matrix.androidsdk.rest.model.bingrules.EventMatchCondition) Condition(org.matrix.androidsdk.rest.model.bingrules.Condition) RoomMemberCountCondition(org.matrix.androidsdk.rest.model.bingrules.RoomMemberCountCondition) ContainsDisplayNameCondition(org.matrix.androidsdk.rest.model.bingrules.ContainsDisplayNameCondition) DeviceCondition(org.matrix.androidsdk.rest.model.bingrules.DeviceCondition) RoomMemberCountCondition(org.matrix.androidsdk.rest.model.bingrules.RoomMemberCountCondition) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 Condition (org.matrix.androidsdk.rest.model.bingrules.Condition)1 ContainsDisplayNameCondition (org.matrix.androidsdk.rest.model.bingrules.ContainsDisplayNameCondition)1 DeviceCondition (org.matrix.androidsdk.rest.model.bingrules.DeviceCondition)1 EventMatchCondition (org.matrix.androidsdk.rest.model.bingrules.EventMatchCondition)1 RoomMemberCountCondition (org.matrix.androidsdk.rest.model.bingrules.RoomMemberCountCondition)1