package net.kencochrane.raven.log4j;

import net.kencochrane.raven.stub.SentryStub;
import org.apache.log4j.Logger;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

public class SentryAppenderIT {
    private static final Logger logger = Logger.getLogger(SentryAppenderIT.class);
    private SentryStub sentryStub;

    @Before
    public void setUp() {
        sentryStub = new SentryStub();
        sentryStub.removeEvents();
    }

    @After
    public void tearDown() {
        sentryStub.removeEvents();
    }

    @Test
    public void testInfoLog() {
        assertThat(sentryStub.getEventCount(), is(0));
        logger.info("This is a test");
        assertThat(sentryStub.getEventCount(), is(1));
    }

    @Test
    public void testChainedExceptions() {
        assertThat(sentryStub.getEventCount(), is(0));
        logger.error("This is an exception",
                new UnsupportedOperationException("Test", new UnsupportedOperationException()));
        assertThat(sentryStub.getEventCount(), is(1));
    }
}

@@ -124,62 +124,69 @@
 org.
-junit.After;%0Aimport org.junit.Before;%0Aimport org.junit
+testng.annotations.AfterMethod;%0Aimport org.testng.annotations
 .Tes
@@ -435,128 +435,28 @@
 Stub
-;%0A%0A    @Before%0A    public void setUp() %7B%0A        sentryStub = new SentryStub();%0A        sentryStub.removeEvents();%0A    %7D
+ = new SentryStub();
 %0A%0A  
@@ -463,16 +463,22 @@
   @After
+Method
 %0A    pub

Move from junit to testng for integration tests