diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/core/model/DocumentTest.cpp | 16 | ||||
-rw-r--r-- | test/core/model/TestAdvanced.hpp | 2 | ||||
-rw-r--r-- | test/core/model/TestDocument.hpp | 2 | ||||
-rw-r--r-- | test/plugins/html/DemoOutputTest.cpp | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/test/core/model/DocumentTest.cpp b/test/core/model/DocumentTest.cpp index 563f1b4..c629bf5 100644 --- a/test/core/model/DocumentTest.cpp +++ b/test/core/model/DocumentTest.cpp @@ -126,7 +126,7 @@ TEST(Document, validate) { // first an invalid one, which is empty. Rooted<Document> doc{new Document(mgr, "myDoc.oxd")}; - doc->addDomain(domain); + doc->referenceDomain(domain); ASSERT_EQ(ValidationState::UNKNOWN, doc->getValidationState()); ASSERT_FALSE(doc->validate(logger)); // then add a root, which should make it valid. @@ -138,7 +138,7 @@ TEST(Document, validate) { // A root with an invalid name, however, should make it invalid Rooted<Document> doc{new Document(mgr, "myDoc.oxd")}; - doc->addDomain(domain); + doc->referenceDomain(domain); Rooted<StructuredEntity> root = buildRootStructuredEntity( doc, logger, {"root"}, {}, "my invalid root"); ASSERT_EQ(ValidationState::UNKNOWN, doc->getValidationState()); @@ -157,7 +157,7 @@ TEST(Document, validate) * document should be invalid again. */ Rooted<Document> doc{new Document(mgr, "myDoc.oxd")}; - doc->addDomain(domain); + doc->referenceDomain(domain); Rooted<StructuredEntity> root = buildRootStructuredEntity(doc, logger, {"root"}); ASSERT_EQ(ValidationState::UNKNOWN, doc->getValidationState()); @@ -181,7 +181,7 @@ TEST(Document, validate) * A document with one instance of the Child subclass should be valid. */ Rooted<Document> doc{new Document(mgr, "myDoc.oxd")}; - doc->addDomain(domain); + doc->referenceDomain(domain); Rooted<StructuredEntity> root = buildRootStructuredEntity(doc, logger, {"root"}); buildStructuredEntity(doc, logger, root, {"childSub"}); @@ -200,7 +200,7 @@ TEST(Document, validate) * invalid, because it has no children of itself. */ Rooted<Document> doc{new Document(mgr, "myDoc.oxd")}; - doc->addDomain(domain); + doc->referenceDomain(domain); Rooted<StructuredEntity> root = buildRootStructuredEntity(doc, logger, {"root"}); buildStructuredEntity(doc, logger, root, {"childSub"}); @@ -218,7 +218,7 @@ TEST(Document, validate) * valid, because of the override. */ Rooted<Document> doc{new Document(mgr, "myDoc.oxd")}; - doc->addDomain(domain); + doc->referenceDomain(domain); Rooted<StructuredEntity> root = buildRootStructuredEntity(doc, logger, {"root"}); buildStructuredEntity(doc, logger, root, {"childSub"}); @@ -234,7 +234,7 @@ TEST(Document, validate) * invalid again, because we are missing the primitive content. */ Rooted<Document> doc{new Document(mgr, "myDoc.oxd")}; - doc->addDomain(domain); + doc->referenceDomain(domain); Rooted<StructuredEntity> root = buildRootStructuredEntity(doc, logger, {"root"}); Rooted<StructuredEntity> child = @@ -259,7 +259,7 @@ TEST(Document, validate) * Create a valid document in itself. */ Rooted<Document> doc{new Document(mgr, "myDoc.oxd")}; - doc->addDomain(domain); + doc->referenceDomain(domain); Rooted<StructuredEntity> root = buildRootStructuredEntity(doc, logger, {"root"}); Rooted<Anchor> start{new Anchor(mgr, "start", root)}; diff --git a/test/core/model/TestAdvanced.hpp b/test/core/model/TestAdvanced.hpp index 035ee8e..d90f917 100644 --- a/test/core/model/TestAdvanced.hpp +++ b/test/core/model/TestAdvanced.hpp @@ -186,7 +186,7 @@ static Rooted<Document> constructAdvancedDocument(Manager &mgr, Logger &logger, { // Start with the (empty) document. Rooted<Document> doc{new Document(mgr, "kant_was_ist_aufklaerung.oxd")}; - doc->addDomains({bookDom, headingDom, listDom, emphasisDom}); + doc->referenceDomains({bookDom, headingDom, listDom, emphasisDom}); // Add the root. Rooted<StructuredEntity> book = diff --git a/test/core/model/TestDocument.hpp b/test/core/model/TestDocument.hpp index 243672b..0cb52a3 100644 --- a/test/core/model/TestDocument.hpp +++ b/test/core/model/TestDocument.hpp @@ -36,7 +36,7 @@ static Rooted<Document> constructBookDocument(Manager &mgr, Logger &logger, { // Start with the (empty) document. Rooted<Document> doc{new Document(mgr, "myDoc.oxd")}; - doc->addDomain(bookDomain); + doc->referenceDomain(bookDomain); // Add the root. Rooted<StructuredEntity> root = diff --git a/test/plugins/html/DemoOutputTest.cpp b/test/plugins/html/DemoOutputTest.cpp index 094b5fd..5006655 100644 --- a/test/plugins/html/DemoOutputTest.cpp +++ b/test/plugins/html/DemoOutputTest.cpp @@ -86,7 +86,7 @@ TEST(DemoHTMLTransformer, AnnotationProcessing) // Construct a document only containing overlapping annotations. // it has the form: <em>bla<strong>blub</em>bla</strong> Rooted<Document> doc{new Document(mgr, "annotations.oxd")}; - doc->addDomains({bookDom, emDom}); + doc->referenceDomains({bookDom, emDom}); Rooted<StructuredEntity> book = buildRootStructuredEntity(doc, logger, {"book"}); ASSERT_TRUE(book != nullptr); |