ObjectUtilTest.java — netty Source File
Architecture documentation for ObjectUtilTest.java, a java file in the netty codebase.
Entity Profile
Relationship Graph
Source Code
/*
* Copyright 2021 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;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* Testcases for io.netty.util.internal.ObjectUtil.
*
* The tests for exceptions do not use a fail mimic. The tests evaluate the
* presence and type, to have really regression character.
*
*/
public class ObjectUtilTest {
private static final Object NULL_OBJECT = null;
private static final Object NON_NULL_OBJECT = "Object is not null";
private static final String NON_NULL_EMPTY_STRING = "";
private static final String NON_NULL_WHITESPACE_STRING = " ";
private static final Object[] NON_NULL_EMPTY_OBJECT_ARRAY = {};
private static final Object[] NON_NULL_FILLED_OBJECT_ARRAY = { NON_NULL_OBJECT };
private static final CharSequence NULL_CHARSEQUENCE = (CharSequence) NULL_OBJECT;
private static final CharSequence NON_NULL_CHARSEQUENCE = (CharSequence) NON_NULL_OBJECT;
private static final CharSequence NON_NULL_EMPTY_CHARSEQUENCE = (CharSequence) NON_NULL_EMPTY_STRING;
private static final byte[] NON_NULL_EMPTY_BYTE_ARRAY = {};
private static final byte[] NON_NULL_FILLED_BYTE_ARRAY = { (byte) 0xa };
private static final char[] NON_NULL_EMPTY_CHAR_ARRAY = {};
private static final char[] NON_NULL_FILLED_CHAR_ARRAY = { 'A' };
private static final String NULL_NAME = "IS_NULL";
private static final String NON_NULL_NAME = "NOT_NULL";
private static final String NON_NULL_EMPTY_NAME = "NOT_NULL_BUT_EMPTY";
private static final String TEST_RESULT_NULLEX_OK = "Expected a NPE/IAE";
private static final String TEST_RESULT_NULLEX_NOK = "Expected no exception";
private static final String TEST_RESULT_EXTYPE_NOK = "Expected type not found";
private static final int ZERO_INT = 0;
private static final long ZERO_LONG = 0;
private static final double ZERO_DOUBLE = 0.0d;
private static final float ZERO_FLOAT = 0.0f;
// ... (555 more lines)
Domain
Subdomains
Classes
Source
Frequently Asked Questions
What does ObjectUtilTest.java do?
ObjectUtilTest.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Telemetry subdomain.
Where is ObjectUtilTest.java in the architecture?
ObjectUtilTest.java is located at common/src/test/java/io/netty/util/internal/ObjectUtilTest.java (domain: Buffer, subdomain: Telemetry, directory: common/src/test/java/io/netty/util/internal).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free