X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fadsal%2Flogging%2Fbridge%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Flogging%2Fbridge%2Finternal%2FLogListenerImplTest.java;fp=opendaylight%2Fadsal%2Flogging%2Fbridge%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Flogging%2Fbridge%2Finternal%2FLogListenerImplTest.java;h=0000000000000000000000000000000000000000;hp=2490c39171f57edd3a5213093984030f6b55dc19;hb=50f88249a65c52ba56a48852b71ce432fed2bbeb;hpb=abfa9a03550cbe9fccc4420684dced175dd6d119 diff --git a/opendaylight/adsal/logging/bridge/src/test/java/org/opendaylight/controller/logging/bridge/internal/LogListenerImplTest.java b/opendaylight/adsal/logging/bridge/src/test/java/org/opendaylight/controller/logging/bridge/internal/LogListenerImplTest.java deleted file mode 100644 index 2490c39171..0000000000 --- a/opendaylight/adsal/logging/bridge/src/test/java/org/opendaylight/controller/logging/bridge/internal/LogListenerImplTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.logging.bridge.internal; - -import org.junit.Test; -import org.osgi.framework.Bundle; -import org.osgi.framework.ServiceReference; -import org.osgi.service.log.LogEntry; -import org.osgi.service.log.LogService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; - -public class LogListenerImplTest { - private static final Logger logger = LoggerFactory.getLogger(LogListenerImplTest.class); - - @Test - public void test() { - LogListenerImpl tested = new LogListenerImpl(logger); - tested.logged(getEntry("m1", null)); - tested.logged(getEntry("m2", new RuntimeException())); - } - - private LogEntry getEntry(final String message, final Exception e) { - return new LogEntry() { - @Override - public Bundle getBundle() { - Bundle mock = mock(Bundle.class); - doReturn(null).when(mock).getSymbolicName(); - return mock; - } - - @Override - public ServiceReference getServiceReference() { - return null; - } - - @Override - public int getLevel() { - return LogService.LOG_INFO; - } - - @Override - public String getMessage() { - return message; - } - - @Override - public Throwable getException() { - return e; - } - - @Override - public long getTime() { - return 0; - } - }; - } - -}