diff options
author | 2019-08-07 13:40:39 -0500 | |
---|---|---|
committer | 2019-08-07 13:40:42 -0500 | |
commit | 3d1706fcbe7f95830ff6fd23cf679ee55c6d0595 (patch) | |
tree | ff97f10380a44d9f81d536c066782af10f728687 /auth/auth-core/src/test/java/org | |
parent | 321dce367d74092a0ba09930c3aa526abdbd5da8 (diff) |
Remove Tabs, per Jococo
Issue-ID: AAF-932
Change-Id: I3ab0ebcc082048d2d1424a58a90ea479fb005ee6
Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-core/src/test/java/org')
3 files changed, 90 insertions, 90 deletions
diff --git a/auth/auth-core/src/test/java/org/onap/aaf/auth/log4j/test/JU_Log4jAccessAppender.java b/auth/auth-core/src/test/java/org/onap/aaf/auth/log4j/test/JU_Log4jAccessAppender.java index 2c5d86b4..8123a82d 100644 --- a/auth/auth-core/src/test/java/org/onap/aaf/auth/log4j/test/JU_Log4jAccessAppender.java +++ b/auth/auth-core/src/test/java/org/onap/aaf/auth/log4j/test/JU_Log4jAccessAppender.java @@ -38,75 +38,75 @@ import org.onap.aaf.cadi.Access; public class JU_Log4jAccessAppender { - @Mock - Access access; - - @Before - public void setUp() { - initMocks(this); - } - - @Test - public void testRequiresLayout() { - Log4JAccessAppender log4jObj = new Log4JAccessAppender(access); - boolean retObj = log4jObj.requiresLayout(); - assertFalse(retObj); - } - - @Test - public void testClose() { - Log4JAccessAppender log4jObj = new Log4JAccessAppender(access); - log4jObj.close(); - - } - - @Test - public void testAppend() { - Log4jAccessAppenderImpl log4jObj = new Log4jAccessAppenderImpl(access); - LoggingEvent event=new LoggingEvent("com.chililog.server.engine",Logger.getLogger(Log4JAccessAppender.class),(new Date()).getTime(),Level.FATAL,"test",Thread.currentThread().getName(),null,null,null,null); - log4jObj.append(event); - Mockito.doReturn(true).when(access).willLog(Access.Level.ERROR); - event=new LoggingEvent("com.chililog.server.engine",Logger.getLogger(Log4JAccessAppender.class),(new Date()).getTime(),Level.ERROR,"test",Thread.currentThread().getName(),null,null,null,null); - log4jObj.append(event); - event=new LoggingEvent("com.chililog.server.engine",Logger.getLogger(Log4JAccessAppender.class),(new Date()).getTime(),Level.ALL,"test",Thread.currentThread().getName(),null,null,null,null); - log4jObj.append(event); - } - - @Test - public void testAppendWARN() { - Log4jAccessAppenderImpl log4jObj = new Log4jAccessAppenderImpl(access); - Mockito.doReturn(false).when(access).willLog(Access.Level.WARN); - LoggingEvent event=new LoggingEvent("com.chililog.server.engine",Logger.getLogger(Log4JAccessAppender.class),(new Date()).getTime(),Level.WARN,"test",Thread.currentThread().getName(),null,null,null,null); - log4jObj.append(event); - } - - @Test - public void testAppendINFO() { - Log4jAccessAppenderImpl log4jObj = new Log4jAccessAppenderImpl(access); - Mockito.doReturn(true).when(access).willLog(Access.Level.INFO); - LoggingEvent event=new LoggingEvent("com.chililog.server.engine",Logger.getLogger(Log4JAccessAppender.class),(new Date()).getTime(),Level.INFO,"test",Thread.currentThread().getName(),null,null,null,null); - log4jObj.append(event); - } - - @Test - public void testAppendWTrace() { - Log4jAccessAppenderImpl log4jObj = new Log4jAccessAppenderImpl(access); - Mockito.doReturn(false).when(access).willLog(Access.Level.TRACE); - LoggingEvent event=new LoggingEvent("com.chililog.server.engine",Logger.getLogger(Log4JAccessAppender.class),(new Date()).getTime(),Level.TRACE,"test",Thread.currentThread().getName(),null,null,null,null); - log4jObj.append(event); - } - - class Log4jAccessAppenderImpl extends Log4JAccessAppender{ + @Mock + Access access; + + @Before + public void setUp() { + initMocks(this); + } + + @Test + public void testRequiresLayout() { + Log4JAccessAppender log4jObj = new Log4JAccessAppender(access); + boolean retObj = log4jObj.requiresLayout(); + assertFalse(retObj); + } + + @Test + public void testClose() { + Log4JAccessAppender log4jObj = new Log4JAccessAppender(access); + log4jObj.close(); + + } + + @Test + public void testAppend() { + Log4jAccessAppenderImpl log4jObj = new Log4jAccessAppenderImpl(access); + LoggingEvent event=new LoggingEvent("com.chililog.server.engine",Logger.getLogger(Log4JAccessAppender.class),(new Date()).getTime(),Level.FATAL,"test",Thread.currentThread().getName(),null,null,null,null); + log4jObj.append(event); + Mockito.doReturn(true).when(access).willLog(Access.Level.ERROR); + event=new LoggingEvent("com.chililog.server.engine",Logger.getLogger(Log4JAccessAppender.class),(new Date()).getTime(),Level.ERROR,"test",Thread.currentThread().getName(),null,null,null,null); + log4jObj.append(event); + event=new LoggingEvent("com.chililog.server.engine",Logger.getLogger(Log4JAccessAppender.class),(new Date()).getTime(),Level.ALL,"test",Thread.currentThread().getName(),null,null,null,null); + log4jObj.append(event); + } + + @Test + public void testAppendWARN() { + Log4jAccessAppenderImpl log4jObj = new Log4jAccessAppenderImpl(access); + Mockito.doReturn(false).when(access).willLog(Access.Level.WARN); + LoggingEvent event=new LoggingEvent("com.chililog.server.engine",Logger.getLogger(Log4JAccessAppender.class),(new Date()).getTime(),Level.WARN,"test",Thread.currentThread().getName(),null,null,null,null); + log4jObj.append(event); + } + + @Test + public void testAppendINFO() { + Log4jAccessAppenderImpl log4jObj = new Log4jAccessAppenderImpl(access); + Mockito.doReturn(true).when(access).willLog(Access.Level.INFO); + LoggingEvent event=new LoggingEvent("com.chililog.server.engine",Logger.getLogger(Log4JAccessAppender.class),(new Date()).getTime(),Level.INFO,"test",Thread.currentThread().getName(),null,null,null,null); + log4jObj.append(event); + } + + @Test + public void testAppendWTrace() { + Log4jAccessAppenderImpl log4jObj = new Log4jAccessAppenderImpl(access); + Mockito.doReturn(false).when(access).willLog(Access.Level.TRACE); + LoggingEvent event=new LoggingEvent("com.chililog.server.engine",Logger.getLogger(Log4JAccessAppender.class),(new Date()).getTime(),Level.TRACE,"test",Thread.currentThread().getName(),null,null,null,null); + log4jObj.append(event); + } + + class Log4jAccessAppenderImpl extends Log4JAccessAppender{ - public Log4jAccessAppenderImpl(Access access) { - super(access); - // TODO Auto-generated constructor stub - } - - @Override - protected void append(LoggingEvent event) { - super.append(event); - } - - } + public Log4jAccessAppenderImpl(Access access) { + super(access); + // TODO Auto-generated constructor stub + } + + @Override + protected void append(LoggingEvent event) { + super.append(event); + } + + } } diff --git a/auth/auth-core/src/test/java/org/onap/aaf/auth/org/test/JU_OrganizationFactory.java b/auth/auth-core/src/test/java/org/onap/aaf/auth/org/test/JU_OrganizationFactory.java index 20b47331..14d702b3 100644 --- a/auth/auth-core/src/test/java/org/onap/aaf/auth/org/test/JU_OrganizationFactory.java +++ b/auth/auth-core/src/test/java/org/onap/aaf/auth/org/test/JU_OrganizationFactory.java @@ -56,7 +56,7 @@ public class JU_OrganizationFactory { @SuppressWarnings("static-access") @Test public void testInit() throws OrganizationException { - Assert.assertEquals(null, organizationFactory.init(bEnv)); + Assert.assertEquals(null, organizationFactory.init(bEnv)); } @SuppressWarnings("static-access") //TODO:Fix this once real input is available AAF-111 diff --git a/auth/auth-core/src/test/java/org/onap/aaf/auth/util/test/TestKill.java b/auth/auth-core/src/test/java/org/onap/aaf/auth/util/test/TestKill.java index c6ddc79f..40e1886e 100644 --- a/auth/auth-core/src/test/java/org/onap/aaf/auth/util/test/TestKill.java +++ b/auth/auth-core/src/test/java/org/onap/aaf/auth/util/test/TestKill.java @@ -27,14 +27,14 @@ import java.util.concurrent.Future; public class TestKill implements Runnable { - public static void main(String[] args) { - ExecutorService es = Executors.newSingleThreadExecutor(); - TestKill tk = new TestKill(); - Future<?> app = es.submit(tk); + public static void main(String[] args) { + ExecutorService es = Executors.newSingleThreadExecutor(); + TestKill tk = new TestKill(); + Future<?> app = es.submit(tk); Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { - System.out.println("Shutdown Hook, thread: setting interrupt"); + System.out.println("Shutdown Hook, thread: setting interrupt"); app.cancel(true); tk.longProcess(); es.shutdown(); @@ -43,23 +43,23 @@ public class TestKill implements Runnable { System.out.println("Service Start"); System.out.print("Hit <enter> to end:"); try { - System.in.read(); - System.exit(0); - } catch (IOException e) { - } - } + System.in.read(); + System.exit(0); + } catch (IOException e) { + } + } @Override - public void run() { - } + public void run() { + } private void longProcess() { - System.out.println("Starting long cleanup process"); - try { - Thread.sleep(10000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - System.out.println("Ending long cleanup process"); + System.out.println("Starting long cleanup process"); + try { + Thread.sleep(10000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + System.out.println("Ending long cleanup process"); } } |