ClassMethodInspector methodInspector = new ClassMethodInspector( clazz, this );
ClassMethodInspector methodInspector = new ClassMethodInspector( clazz, this );
@Test public void testCollection() throws Exception { final ClassMethodInspector ext = new ClassMethodInspector( Collection.class, new Converter() ); for ( String s : ext.getMethodNames() ) { assertFalse( "Method " + s + " is not allowed.", allowedMethod( s ) ); } }
@Test public void testList() throws Exception { final ClassMethodInspector ext = new ClassMethodInspector( List.class, new Converter() ); for ( String s : ext.getMethodNames() ) { assertFalse( "Method " + s + " is not allowed.", allowedMethod( s ) ); } }
@Test public void testArrayList() throws Exception { final ClassMethodInspector ext = new ClassMethodInspector( ArrayList.class, new Converter() ); for ( String s : ext.getMethodNames() ) { assertFalse( "Method " + s + " is not allowed.", allowedMethod( s ) ); } }
@Test public void testSimpleMethods() throws Exception { final ClassMethodInspector ext = new ClassMethodInspector( SimpleMethods.class, new Converter() ); for ( String s : ext.getMethodNames() ) { assertFalse( "Method " + s + " is not allowed.", allowedMethod( s ) ); } }
@Test public void testMoreThanOneMethodWithTheSameName() throws Exception { final ClassMethodInspector ext = new ClassMethodInspector( MoreThanOneMethodWithTheSameName.class, new Converter() ); for ( String s : ext.getMethodNames() ) { assertFalse( "Method " + s + " is not allowed.", allowedMethod( s ) ); } }
@Test public void testSet() throws Exception { final ClassMethodInspector ext = new ClassMethodInspector( Set.class, new Converter() ); for ( String s : ext.getMethodNames() ) { assertFalse( "Method " + s + " is not allowed.", allowedMethod( s ) ); } }
@Test public void testMap() throws Exception { final ClassMethodInspector ext = new ClassMethodInspector( Map.class, new Converter() ); for ( String s : ext.getMethodNames() ) { assertFalse( "Method " + s + " is not allowed.", allowedMethod( s ) ); } }
@Test public void testMyMap() throws Exception { final ClassMethodInspector ext = new ClassMethodInspector( MyMap.class, new Converter() ); for ( String s : ext.getMethodNames() ) { assertFalse( "Method " + s + " is not allowed.", allowedMethod( s ) ); } }