diff options
Diffstat (limited to 'document/src/test/java/com/yahoo')
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()); - } -} |