-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathEntityFunctionSpecTest.java
More file actions
44 lines (34 loc) · 1.16 KB
/
EntityFunctionSpecTest.java
File metadata and controls
44 lines (34 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package com.kloia.eventapis.view;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;
@RunWith(MockitoJUnitRunner.class)
public class EntityFunctionSpecTest {
private EntityFunctionSpec entityFunctionSpec;
private class EntityType {
}
private class QueryType {
}
@Before
public void setUp() throws Exception {
entityFunctionSpec = new EntityFunctionSpec<EntityType, QueryType>((previous, event) -> null) {
@Override
public EntityFunction<EntityType, QueryType> getEntityFunction() {
return super.getEntityFunction();
}
};
}
@Test
public void shouldGetQueryType() throws Exception {
Class queryType = entityFunctionSpec.getQueryType();
assertThat(queryType, equalTo(QueryType.class));
}
@Test
public void shouldGetEntityType() throws Exception {
Class entityType = entityFunctionSpec.getEntityType();
assertThat(entityType, equalTo(EntityType.class));
}
}