@Test public void testCheckInputWithoutDimention() throws ClassNotFoundException { Collector collector = Collector.getCollector("TestCollector"); assertEquals(true, collector.checkInput("ObjectType", "ot1", "ctr1", 1)); assertEquals(true, collector.checkInput("ObjectType", "ot1", "ctr2", 1L)); assertEquals(true, collector.checkInput("ObjectType", "ot1", "ctr3", "kdjkjsk")); assertEquals(false, collector.checkInput("ObjectType", "ot1", "ctr1", 12L)); assertEquals(false, collector.checkInput("ObjectType", "ot1", "ctr2", "mksmkfms")); assertEquals(false, collector.checkInput("ObjectType", "ot1", "ctr3", 1)); }
@Test public void testCheckInputWithDimention() throws ClassNotFoundException { Collector collector = Collector.getCollector("TestCollector"); assertEquals( true, collector.checkInput("ObjectType", "ot2", "dim1", 1, "dim2", "Cell=997", "ctr1", 1)); assertEquals( true, collector.checkInput("ObjectType", "ot2", "dim1", 45, "dim2", "Cell=998", "ctr2", 1L)); assertEquals( true, collector.checkInput( "ObjectType", "ot2", "dim1", 32, "dim2", "Cell=999", "ctr3", "kdjkjsk")); assertEquals(false, collector.checkInput("ObjectType", "ot2", "ctr1", 12L)); assertEquals(false, collector.checkInput("ObjectType", "ot2", "dim1", 1, "ctr2", "mksmkfms")); assertEquals( false, collector.checkInput("ObjectType", "ot2", "dim1", 1L, "dim2", "Cell=997", "ctr3", 1)); assertEquals( false, collector.checkInput("ObjectType", "ot2", "dim1", "lsjdl", "dim2", "Cell=997", "ctr3", 1)); }