Remove tests from jOOQ-postgres-extensions in OSS edition

This commit is contained in:
Lukas Eder 2022-03-07 10:31:35 +01:00
parent 77c1cd2ebf
commit 7dab18c340
3 changed files with 0 additions and 198 deletions

View File

@ -1,75 +0,0 @@
/*
* Licensed 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
*
* http://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.
*
* Other licenses:
* -----------------------------------------------------------------------------
* Commercial licenses for this work are available. These replace the above
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
* database integrations.
*
* For more information, please visit: http://www.jooq.org/licenses
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.jooq.postgres.extensions.test;
import static org.jooq.postgres.extensions.test.RangeTestUtils.assertEqualsHashCode;
import static org.jooq.postgres.extensions.types.IntegerRange.integerRange;
import static org.junit.Assert.assertNotEquals;
import org.junit.Test;
public class IntegerRangeTest {
@Test
public void testEqualsHashCode() {
assertEqualsHashCode(integerRange(0, 0), integerRange(0, 0));
assertEqualsHashCode(integerRange(0, 0), integerRange(1, 1));
assertEqualsHashCode(integerRange(0, 1), integerRange(0, 1));
assertEqualsHashCode(integerRange(0, 2), integerRange(0, true, 1, true));
assertEqualsHashCode(integerRange(0, 2), integerRange(0, true, 2, false));
assertEqualsHashCode(integerRange(0, 2), integerRange(-1, false, 1, true));
assertEqualsHashCode(integerRange(0, 2), integerRange(-1, false, 2, false));
assertEqualsHashCode(integerRange(0, null), integerRange(0, true, null, true));
assertEqualsHashCode(integerRange(0, null), integerRange(0, true, null, false));
assertEqualsHashCode(integerRange(0, null), integerRange(-1, false, null, true));
assertEqualsHashCode(integerRange(0, null), integerRange(-1, false, null, false));
assertEqualsHashCode(integerRange(null, 2), integerRange(null, true, 1, true));
assertEqualsHashCode(integerRange(null, 2), integerRange(null, true, 2, false));
assertEqualsHashCode(integerRange(null, 2), integerRange(null, false, 1, true));
assertEqualsHashCode(integerRange(null, 2), integerRange(null, false, 2, false));
assertEqualsHashCode(integerRange(null, null), integerRange(null, true, null, true));
assertEqualsHashCode(integerRange(null, null), integerRange(null, true, null, false));
assertEqualsHashCode(integerRange(null, null), integerRange(null, false, null, true));
assertEqualsHashCode(integerRange(null, null), integerRange(null, false, null, false));
assertNotEquals(integerRange(0, 1), integerRange(1, 0));
}
}

View File

@ -1,75 +0,0 @@
/*
* Licensed 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
*
* http://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.
*
* Other licenses:
* -----------------------------------------------------------------------------
* Commercial licenses for this work are available. These replace the above
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
* database integrations.
*
* For more information, please visit: http://www.jooq.org/licenses
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.jooq.postgres.extensions.test;
import static org.jooq.postgres.extensions.test.RangeTestUtils.assertEqualsHashCode;
import static org.jooq.postgres.extensions.types.LongRange.longRange;
import static org.junit.Assert.assertNotEquals;
import org.junit.Test;
public class LongRangeTest {
@Test
public void testEqualsHashCode() {
assertEqualsHashCode(longRange(0L, 0L), longRange(0L, 0L));
assertEqualsHashCode(longRange(0L, 0L), longRange(1L, 1L));
assertEqualsHashCode(longRange(0L, 1L), longRange(0L, 1L));
assertEqualsHashCode(longRange(0L, 2L), longRange(0L, true, 1L, true));
assertEqualsHashCode(longRange(0L, 2L), longRange(0L, true, 2L, false));
assertEqualsHashCode(longRange(0L, 2L), longRange(-1L, false, 1L, true));
assertEqualsHashCode(longRange(0L, 2L), longRange(-1L, false, 2L, false));
assertEqualsHashCode(longRange(0L, null), longRange(0L, true, null, true));
assertEqualsHashCode(longRange(0L, null), longRange(0L, true, null, false));
assertEqualsHashCode(longRange(0L, null), longRange(-1L, false, null, true));
assertEqualsHashCode(longRange(0L, null), longRange(-1L, false, null, false));
assertEqualsHashCode(longRange(null, 2L), longRange(null, true, 1L, true));
assertEqualsHashCode(longRange(null, 2L), longRange(null, true, 2L, false));
assertEqualsHashCode(longRange(null, 2L), longRange(null, false, 1L, true));
assertEqualsHashCode(longRange(null, 2L), longRange(null, false, 2L, false));
assertEqualsHashCode(longRange(null, null), longRange(null, true, null, true));
assertEqualsHashCode(longRange(null, null), longRange(null, true, null, false));
assertEqualsHashCode(longRange(null, null), longRange(null, false, null, true));
assertEqualsHashCode(longRange(null, null), longRange(null, false, null, false));
assertNotEquals(longRange(0L, 1L), longRange(1L, 0L));
}
}

View File

@ -1,48 +0,0 @@
/*
* Licensed 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
*
* http://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.
*
* Other licenses:
* -----------------------------------------------------------------------------
* Commercial licenses for this work are available. These replace the above
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
* database integrations.
*
* For more information, please visit: http://www.jooq.org/licenses
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.jooq.postgres.extensions.test;
import static org.junit.Assert.assertEquals;
public class RangeTestUtils {
public static void assertEqualsHashCode(Object expected, Object actual) {
assertEquals(expected, actual);
assertEquals(expected.hashCode(), actual.hashCode());
}
}