fd9f11236b5c8e476b9ec061f581d7b73fbd6815
[aai/sparky-be.git] / sparkybe-onap-service / src / test / java / org / onap / aai / sparky / search / filters / entity / AggregationEntityTest.java
1 package org.onap.aai.sparky.search.filters.entity;
2
3 import static org.junit.Assert.assertEquals;
4 import static org.junit.Assert.assertNotNull;
5
6 import org.junit.Before;
7 import org.junit.Test;
8
9
10 public class AggregationEntityTest {
11
12   private AggregationEntity aggregateEntity;
13
14   @Before
15   public void init() throws Exception {
16     aggregateEntity = new AggregationEntity("aggregate-1", "autosuggest", 10);
17
18   }
19
20   @Test
21   public void updateValues() {
22
23     aggregateEntity.setAggregationName("aggregate-2");
24     assertNotNull(aggregateEntity.getAggregationName());
25     aggregateEntity.setAggregationFieldName("autosearch");
26     assertNotNull(aggregateEntity.getAggregationFieldName());
27     assertNotNull(aggregateEntity.getJsonObject());
28     aggregateEntity.setSize(25);
29     assertEquals(25, aggregateEntity.getSize());
30
31   }
32
33 }