AbstractInternalLoggerTest.java — netty Source File
Architecture documentation for AbstractInternalLoggerTest.java, a java file in the netty codebase.
Entity Profile
Relationship Graph
Source Code
/*
* Copyright 2017 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.util.internal.logging;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import org.junit.jupiter.api.Test;
/**
* We only need to test methods defined by {@link InternalLogger}.
*/
public abstract class AbstractInternalLoggerTest<T> {
protected String loggerName = "foo";
protected T mockLog;
protected InternalLogger logger;
protected final Map<String, Object> result = new HashMap<String, Object>();
@SuppressWarnings("unchecked")
protected <V> V getResult(String key) {
return (V) result.get(key);
}
@Test
public void testName() {
assertEquals(loggerName, logger.name());
}
@Test
public void testAllLevel() throws Exception {
testLevel(InternalLogLevel.TRACE);
testLevel(InternalLogLevel.DEBUG);
testLevel(InternalLogLevel.INFO);
testLevel(InternalLogLevel.WARN);
testLevel(InternalLogLevel.ERROR);
}
protected void testLevel(InternalLogLevel level) throws Exception {
result.clear();
String format1 = "a={}", format2 = "a={}, b= {}", format3 = "a={}, b= {}, c= {}";
String msg = "a test message from Junit";
// ... (91 more lines)
Domain
Subdomains
Classes
Source
Frequently Asked Questions
What does AbstractInternalLoggerTest.java do?
AbstractInternalLoggerTest.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Telemetry subdomain.
Where is AbstractInternalLoggerTest.java in the architecture?
AbstractInternalLoggerTest.java is located at common/src/test/java/io/netty/util/internal/logging/AbstractInternalLoggerTest.java (domain: Buffer, subdomain: Telemetry, directory: common/src/test/java/io/netty/util/internal/logging).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free