aboutsummaryrefslogtreecommitdiffstats
path: root/document/src/test/java/com/yahoo
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahooinc.com>2022-06-02 10:40:41 +0000
committergjoranv <gv@verizonmedia.com>2022-06-08 11:45:24 +0200
commit338d383d81ee6b142b308ef8798b44374b480838 (patch)
tree0af5af65e84a05fb2f8fbdcb1050b9d5db793937 /document/src/test/java/com/yahoo
parent9e330c98d573866f162ef76207a8699d76d634c4 (diff)
remove TemporaryStructuredDataType
Diffstat (limited to 'document/src/test/java/com/yahoo')
-rw-r--r--document/src/test/java/com/yahoo/document/DocumentTypeManagerTestCase.java2
-rw-r--r--document/src/test/java/com/yahoo/document/ReferenceDataTypeTestCase.java28
-rw-r--r--document/src/test/java/com/yahoo/document/TemporaryStructuredDataTypeTestCase.java24
3 files changed, 0 insertions, 54 deletions
diff --git a/document/src/test/java/com/yahoo/document/DocumentTypeManagerTestCase.java b/document/src/test/java/com/yahoo/document/DocumentTypeManagerTestCase.java
index e0efb7e572e..f6cf589cce5 100644
--- a/document/src/test/java/com/yahoo/document/DocumentTypeManagerTestCase.java
+++ b/document/src/test/java/com/yahoo/document/DocumentTypeManagerTestCase.java
@@ -528,14 +528,12 @@ search annotationsimplicitstruct {
assertReferenceTypePresentInManager(manager, 87654321, "referenced_type2");
}
- @SuppressWarnings("deprecation")
@Test
public void no_temporary_targets_in_references_or_names() {
DocumentTypeManager manager = createConfiguredManager("file:src/test/document/documentmanager.replaced_temporary.cfg");
DocumentType docType = manager.getDocumentType("ad");
Field f = docType.getField("campaign_ref");
assertTrue(f.getDataType() instanceof ReferenceDataType);
- assertFalse(((ReferenceDataType)f.getDataType()).getTargetType() instanceof TemporaryStructuredDataType);
assertEquals("Reference<mystiqueCampaign>", f.getDataType().getName());
}
diff --git a/document/src/test/java/com/yahoo/document/ReferenceDataTypeTestCase.java b/document/src/test/java/com/yahoo/document/ReferenceDataTypeTestCase.java
index 53c8a0ecc94..a14b56cc539 100644
--- a/document/src/test/java/com/yahoo/document/ReferenceDataTypeTestCase.java
+++ b/document/src/test/java/com/yahoo/document/ReferenceDataTypeTestCase.java
@@ -72,32 +72,4 @@ public class ReferenceDataTypeTestCase {
assertTrue(fixture.refType.isValueCompatible(fixture.refTypeClone.createFieldValue()));
}
- @SuppressWarnings("deprecation")
- @Test
- public void reference_type_can_be_constructed_with_temporary_structured_data_type() {
- TemporaryStructuredDataType tempType = new TemporaryStructuredDataType("cooldoc");
- ReferenceDataType refType = new ReferenceDataType(tempType, 321);
- assertEquals("Reference<cooldoc>", refType.getName());
- assertEquals(321, refType.getId());
- assertEquals(tempType, refType.getTargetType());
- }
-
- @SuppressWarnings("deprecation")
- @Test
- public void can_replace_temporary_target_data_type() {
- TemporaryStructuredDataType tempType = new TemporaryStructuredDataType("cooldoc");
- ReferenceDataType refType = new ReferenceDataType(tempType, 321);
- DocumentType concreteType = new DocumentType("cooldoc");
- refType.setTargetType(concreteType);
- assertEquals("Reference<cooldoc>", refType.getName());
- assertEquals(321, refType.getId());
- assertEquals(concreteType, refType.getTargetType());
- }
-
- @Test(expected = IllegalStateException.class)
- public void replacing_already_concrete_type_throws_illegal_state_exception() {
- ReferenceDataType refType = new ReferenceDataType(new DocumentType("foo"), 123);
- refType.setTargetType(new DocumentType("foo"));
- }
-
}
diff --git a/document/src/test/java/com/yahoo/document/TemporaryStructuredDataTypeTestCase.java b/document/src/test/java/com/yahoo/document/TemporaryStructuredDataTypeTestCase.java
deleted file mode 100644
index 3b5cd29b90d..00000000000
--- a/document/src/test/java/com/yahoo/document/TemporaryStructuredDataTypeTestCase.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.document;
-
-import org.junit.Test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-
-/**
- * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
- * @since 5.1.10
- */
-@SuppressWarnings("deprecation")
-public class TemporaryStructuredDataTypeTestCase {
- @Test
- public void basic() {
- TemporaryStructuredDataType type = TemporaryStructuredDataType.create("banana");
- assertEquals("banana", type.getName());
- int originalId = type.getId();
- type.setName("apple");
- assertEquals("apple", type.getName());
- assertNotEquals(originalId, type.getId());
- }
-}