summaryrefslogtreecommitdiffstats
path: root/sparkybe-onap-service/src/test/java/org/onap/aai/sparky/search/filters/entity/AggregationEntityTest.java
blob: fd9f11236b5c8e476b9ec061f581d7b73fbd6815 (plain)
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
package org.onap.aai.sparky.search.filters.entity;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import org.junit.Before;
import org.junit.Test;


public class AggregationEntityTest {

  private AggregationEntity aggregateEntity;

  @Before
  public void init() throws Exception {
    aggregateEntity = new AggregationEntity("aggregate-1", "autosuggest", 10);

  }

  @Test
  public void updateValues() {

    aggregateEntity.setAggregationName("aggregate-2");
    assertNotNull(aggregateEntity.getAggregationName());
    aggregateEntity.setAggregationFieldName("autosearch");
    assertNotNull(aggregateEntity.getAggregationFieldName());
    assertNotNull(aggregateEntity.getJsonObject());
    aggregateEntity.setSize(25);
    assertEquals(25, aggregateEntity.getSize());

  }

}