Package net.sourceforge.purrpackage.recording

Examples of net.sourceforge.purrpackage.recording.MockCoberturaManager.replaceCoberturaManagerSingleton()


    }
   
    @Test
    public void testThings() throws Exception {
        MockCoberturaManager cm = new MockCoberturaManager();
        cm.replaceCoberturaManagerSingleton();
        Class<?> stClass = loadInstrumentedClass( "jcr.SampleTest" );
        Object st = stClass.newInstance();
        Method m = stClass.getMethod( "testMarked" );
        m.invoke( st );
        List<String> expected = new ArrayList<String>();
View Full Code Here


    }

    @Test
    public void testTestCaseSubclassInstrumentation() throws Exception {
        MockCoberturaManager cm = new MockCoberturaManager();
        cm.replaceCoberturaManagerSingleton();
        Class<?> stClass = loadInstrumentedClass("jcr.OldStyleSampleTest");
        Object st = stClass.newInstance();
        Method m = stClass.getMethod("setUp");
        m.invoke(st);
        List<String> expected = new ArrayList<String>();
View Full Code Here

    }
   
    @Test
    public void testThrowCatchBug() throws Exception {
        MockCoberturaManager cm = new MockCoberturaManager();
        cm.replaceCoberturaManagerSingleton();
        Class<?> stClass = loadInstrumentedClass("jcr.ThrowCatchBugTest");
        Object st = stClass.newInstance();
        Method m = stClass.getMethod( "catchBug", Double.TYPE );
        try {
            m.invoke( st, 4.1 );
View Full Code Here

    }
   
    @Test
    public void testTestNGClassAnnotationInstrumentation() throws Exception {
        MockCoberturaManager cm = new MockCoberturaManager();
        cm.replaceCoberturaManagerSingleton();
        Class<?> testngClass = loadInstrumentedClass("jcr.TestNGClassTest");
        Object st = testngClass.newInstance();
        Method m = testngClass.getMethod("publicMethod");
        m.invoke(st);
        List<String> expected = new ArrayList<String>();
View Full Code Here

        }
    }
    @Test
    public void testSelectorIssues() throws Exception {
       MockCoberturaManager cm = new MockCoberturaManager();
       cm.replaceCoberturaManagerSingleton();
       try {
            new StaticAroundAdviceTransformer( "zoot", this );
            fail();
        }
        catch( Exception e ) {
View Full Code Here

    }

    @Test
    public void testGroovyBug() throws Exception {
        MockCoberturaManager cm = new MockCoberturaManager();
        cm.replaceCoberturaManagerSingleton();
        Class<?> stClass = loadInstrumentedClass("jcr.GroovySample");
        List<String> expected = new ArrayList<String>();
        assertEquals( expected,  cm.getMessages() );
        Method m = stClass.getMethod("staticInstrumentedMethod", Closure.class);
        try {
View Full Code Here

    }
   
    @Test
    public void testStaticStackBug() throws Exception {
        MockCoberturaManager cm = new MockCoberturaManager();
        cm.replaceCoberturaManagerSingleton();
        Class<?> stClass = loadInstrumentedClass( "jcr.SampleTest" );
        Method m = stClass.getMethod( "afterClass" );
        m.invoke( stClass );
        List<String> expected = new ArrayList<String>();
        expected.add("jcr");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.