@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); }
@Test(expected = IllegalArgumentException.class) public void testFilterWrongDim() { m_filter.filter(m_ele2); }
@Test(expected = IllegalArgumentException.class) public void testAddWrongDim() { m_filter.addElement(m_ele2); }
@Test public void testNotFound() { assertTrue(!m_filter.filter(m_ele1c)); }
@Test public void testFound() { assertTrue(m_filter.filter(m_ele1a)); }