Пример #1
0
 @Before
 public void setUp() {
   m_dim1 = new DataKeyDimension("dim1");
   m_dim2 = new DataKeyDimension("dim2");
   m_ele1a = new DataKeyElement("val1a", m_dim1);
   m_ele1b = new DataKeyElement("val1b", m_dim1);
   m_ele1c = new DataKeyElement("val1c", m_dim1);
   m_ele2 = new DataKeyElement("val2", m_dim2);
   m_filter = new BasicElementFilter(m_dim1);
   m_filter.addElements(m_ele1a, m_ele1b);
 }
Пример #2
0
 @Test(expected = IllegalArgumentException.class)
 public void testFilterWrongDim() {
   m_filter.filter(m_ele2);
 }
Пример #3
0
 @Test(expected = IllegalArgumentException.class)
 public void testAddWrongDim() {
   m_filter.addElement(m_ele2);
 }
Пример #4
0
 @Test
 public void testNotFound() {
   assertTrue(!m_filter.filter(m_ele1c));
 }
Пример #5
0
 @Test
 public void testFound() {
   assertTrue(m_filter.filter(m_ele1a));
 }