Skip to content

Commit

Permalink
Merge pull request OpenLiberty#1081 from mrglavas/1080#test-imposter-…
Browse files Browse the repository at this point in the history
…classes

Create java.lang and java.math imposter classes for use in testing qualified names.
  • Loading branch information
mrglavas authored Nov 7, 2024
2 parents cc044cc + c17a0b5 commit 658a78a
Show file tree
Hide file tree
Showing 12 changed files with 450 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*******************************************************************************
* Copyright (c) 2024 IBM Corporation.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package ng;

import java.io.Serializable;

/**
* This class can be used in testing to impersonate java.lang.Boolean in order to
* verify that qualified class names are processed correctly. It is not intended to
* be complete or functional.
*/
public class Boolean implements Serializable, Comparable<Boolean> {

@Override
public int compareTo(Boolean o) {
return 0;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*******************************************************************************
* Copyright (c) 2024 IBM Corporation.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package ng;

/**
* This class can be used in testing to impersonate java.lang.Byte in order to
* verify that qualified class names are processed correctly. It is not intended to
* be complete or functional.
*/
public class Byte extends Number implements Comparable<Byte> {

@Override
public int compareTo(Byte o) {
return 0;
}

@Override
public int intValue() {
return 0;
}

@Override
public long longValue() {
return 0;
}

@Override
public float floatValue() {
return 0;
}

@Override
public double doubleValue() {
return 0;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*******************************************************************************
* Copyright (c) 2024 IBM Corporation.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package ng;

/**
* This class can be used in testing to impersonate java.lang.CharSequence in order to
* verify that qualified class names are processed correctly. It is not intended to
* be complete or functional.
*/
public interface CharSequence {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*******************************************************************************
* Copyright (c) 2024 IBM Corporation.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package ng;

import java.io.Serializable;

/**
* This class can be used in testing to impersonate java.lang.Character in order to
* verify that qualified class names are processed correctly. It is not intended to
* be complete or functional.
*/
public class Character implements Serializable, Comparable<Character> {

@Override
public int compareTo(Character o) {
return 0;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*******************************************************************************
* Copyright (c) 2024 IBM Corporation.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package ng;

/**
* This class can be used in testing to impersonate java.lang.Double in order to
* verify that qualified class names are processed correctly. It is not intended to
* be complete or functional.
*/
public class Double extends Number implements Comparable<Double> {

@Override
public int compareTo(Double o) {
return 0;
}

@Override
public int intValue() {
return 0;
}

@Override
public long longValue() {
return 0;
}

@Override
public float floatValue() {
return 0;
}

@Override
public double doubleValue() {
return 0;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*******************************************************************************
* Copyright (c) 2024 IBM Corporation.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package ng;

/**
* This class can be used in testing to impersonate java.lang.Float in order to
* verify that qualified class names are processed correctly. It is not intended to
* be complete or functional.
*/
public class Float extends Number implements Comparable<Float> {

@Override
public int compareTo(Float o) {
return 0;
}

@Override
public int intValue() {
return 0;
}

@Override
public long longValue() {
return 0;
}

@Override
public float floatValue() {
return 0;
}

@Override
public double doubleValue() {
return 0;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*******************************************************************************
* Copyright (c) 2024 IBM Corporation.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package ng;

/**
* This class can be used in testing to impersonate java.lang.Integer in order to
* verify that qualified class names are processed correctly. It is not intended to
* be complete or functional.
*/
public class Integer extends Number implements Comparable<Integer> {

@Override
public int compareTo(Integer o) {
return 0;
}

@Override
public int intValue() {
return 0;
}

@Override
public long longValue() {
return 0;
}

@Override
public float floatValue() {
return 0;
}

@Override
public double doubleValue() {
return 0;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*******************************************************************************
* Copyright (c) 2024 IBM Corporation.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package ng;

/**
* This class can be used in testing to impersonate java.lang.Long in order to
* verify that qualified class names are processed correctly. It is not intended to
* be complete or functional.
*/
public class Long extends Number implements Comparable<Long> {

@Override
public int compareTo(Long o) {
return 0;
}

@Override
public int intValue() {
return 0;
}

@Override
public long longValue() {
return 0;
}

@Override
public float floatValue() {
return 0;
}

@Override
public double doubleValue() {
return 0;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*******************************************************************************
* Copyright (c) 2024 IBM Corporation.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package ng;

/**
* This class can be used in testing to impersonate java.lang.Short in order to
* verify that qualified class names are processed correctly. It is not intended to
* be complete or functional.
*/
public class Short extends Number implements Comparable<Short> {

@Override
public int compareTo(Short o) {
return 0;
}

@Override
public int intValue() {
return 0;
}

@Override
public long longValue() {
return 0;
}

@Override
public float floatValue() {
return 0;
}

@Override
public double doubleValue() {
return 0;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*******************************************************************************
* Copyright (c) 2024 IBM Corporation.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package ng;

import java.io.Serializable;

/**
* This class can be used in testing to impersonate java.lang.String in order to
* verify that qualified class names are processed correctly. It is not intended to
* be complete or functional.
*/
public class String implements Serializable, Comparable<String>, CharSequence {

@Override
public int compareTo(String o) {
return 0;
}
}
Loading

0 comments on commit 658a78a

Please sign in to comment.