From c48f952ff5e07796926ae43f0ed498e01a2d4139 Mon Sep 17 00:00:00 2001 From: Torsten Bergmann Date: Tue, 24 Oct 2023 13:04:15 +0200 Subject: [PATCH] Fix lints Fix #21 --- src/XML-Parser-Tests/SAXHandlerTest.class.st | 47 +- .../XMLBasicElementClassMapperTest.class.st | 769 +++++++++--------- src/XML-Parser-Tests/XMLDocumentTest.class.st | 6 +- src/XML-Parser-Tests/XMLElementTest.class.st | 53 +- .../XMLEntityDeclarationTest.class.st | 64 +- .../XMLNodeWithChildrenTest.class.st | 14 +- .../XMLNodeWithElementsTest.class.st | 94 +-- src/XML-Parser-Tests/XMLParserTest.class.st | 98 ++- src/XML-Parser-Tests/XMLStringTest.class.st | 12 +- src/XML-Parser-Tests/XMLURITest.class.st | 39 +- 10 files changed, 608 insertions(+), 588 deletions(-) diff --git a/src/XML-Parser-Tests/SAXHandlerTest.class.st b/src/XML-Parser-Tests/SAXHandlerTest.class.st index 3692ab2f..1b6f4d6a 100644 --- a/src/XML-Parser-Tests/SAXHandlerTest.class.st +++ b/src/XML-Parser-Tests/SAXHandlerTest.class.st @@ -163,46 +163,52 @@ SAXHandlerTest >> testComment [ { #category : #tests } SAXHandlerTest >> testConfiguration [ - | parser oldConfiguration newConfiguration | + | parser oldConfiguration newConfiguration | parser := SAXHandler on: self prefixedXMLSource. oldConfiguration := parser configuration. - self assert: oldConfiguration class == self configurationClass. + self + assert: oldConfiguration class + identicalTo: self configurationClass. newConfiguration := self configurationClass new. self - assert: (parser configuration: newConfiguration) == parser; - assert: parser configuration class == self configurationClass + assert: (parser configuration: newConfiguration) + identicalTo: parser; + assert: parser configuration class + identicalTo: self configurationClass ] { #category : #tests } SAXHandlerTest >> testDecodesCharacters [ - | parser | + | parser | parser := SAXHandler on: self prefixedXMLSource. self assert: parser decodesCharacters; - assert: (parser decodesCharacters: false) == parser; + assert: (parser decodesCharacters: false) identicalTo: parser; deny: parser decodesCharacters; - assert: (parser decodesCharacters: true) == parser; + assert: (parser decodesCharacters: true) identicalTo: parser; assert: parser decodesCharacters ] { #category : #tests } SAXHandlerTest >> testDocumentReadLimit [ + | parser | parser := SAXHandler on: self prefixedXMLSource. self assert: parser documentReadLimit - equals: XMLParserLimits defaultDocumentReadLimit; - assert: (parser documentReadLimit: 100000) == parser; + equals: XMLParserLimits defaultDocumentReadLimit; + assert: (parser documentReadLimit: 100000) identicalTo: parser; assert: parser documentReadLimit equals: 100000; - assert: (parser documentReadLimit: nil) == parser; + assert: (parser documentReadLimit: nil) identicalTo: parser; assert: parser documentReadLimit isNil ] { #category : #tests } SAXHandlerTest >> testDocumentURI [ + | xml uri newURI parser | xml := self prefixedXMLSource. uri := 'test/test.xml'. @@ -210,7 +216,7 @@ SAXHandlerTest >> testDocumentURI [ parser := SAXHandler on: xml documentURI: uri. self assert: parser documentURI equals: uri; - assert: (parser documentURI: newURI) == parser; + assert: (parser documentURI: newURI) identicalTo: parser; assert: parser documentURI equals: newURI. "reusing on: should clear it" @@ -389,16 +395,19 @@ SAXHandlerTest >> testEndPrefixMapping [ { #category : #tests } SAXHandlerTest >> testExternalEntityResolver [ - | parser oldResolver newResolver | + | parser oldResolver newResolver | parser := SAXHandler on: self prefixedXMLSource. oldResolver := parser externalEntityResolver. - self assert: oldResolver class == self externalEntityResolverClass. + self + assert: oldResolver class + identicalTo: self externalEntityResolverClass. newResolver := self externalEntityResolverClass new. self - assert: (parser externalEntityResolver: newResolver) == parser; - assert: parser externalEntityResolver == newResolver. + assert: (parser externalEntityResolver: newResolver) + identicalTo: parser; + assert: parser externalEntityResolver identicalTo: newResolver ] { #category : #tests } @@ -990,15 +999,15 @@ SAXHandlerTest >> testStartPrefixMappingURI [ { #category : #tests } SAXHandlerTest >> testUsesNamespaces [ - | parser | + | parser | parser := SAXHandler on: self prefixedXMLSource. self assert: parser usesNamespaces; - assert: (parser usesNamespaces: false) == parser; + assert: (parser usesNamespaces: false) identicalTo: parser; deny: parser usesNamespaces; - assert: (parser usesNamespaces: true) == parser; - assert: parser usesNamespaces. + assert: (parser usesNamespaces: true) identicalTo: parser; + assert: parser usesNamespaces ] { #category : #tests } diff --git a/src/XML-Parser-Tests/XMLBasicElementClassMapperTest.class.st b/src/XML-Parser-Tests/XMLBasicElementClassMapperTest.class.st index 2d7c5138..69cd6362 100644 --- a/src/XML-Parser-Tests/XMLBasicElementClassMapperTest.class.st +++ b/src/XML-Parser-Tests/XMLBasicElementClassMapperTest.class.st @@ -489,511 +489,538 @@ XMLBasicElementClassMapperTest >> testClassForElementNamespaceURIAttributes [ { #category : #tests } XMLBasicElementClassMapperTest >> testClassForElementNamespaceURIAttributesIfNone [ - | mapper | + | mapper | mapper := self newMapper. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - attributes: self attributes - ifNone: [#none]) == #none. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - attributes: self attributes - ifNone: [#none]) == #none. - - mapper - mapElement: 'test' - toClass: self otherElementClass. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - attributes: self attributes - ifNone: [self fail]) == self otherElementClass. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - attributes: self attributes - ifNone: [self fail]) == self otherElementClass. + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + attributes: self attributes + ifNone: [ #none ]) + identicalTo: #none. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + attributes: self attributes + ifNone: [ #none ]) + identicalTo: #none. + + mapper mapElement: 'test' toClass: self otherElementClass. + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + attributes: self attributes + ifNone: [ self fail ]) + identicalTo: self otherElementClass. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + attributes: self attributes + ifNone: [ self fail ]) + identicalTo: self otherElementClass. mapper mapElement: 'test' attributeSpec: self attributes asXMLAttributeSpec toClass: self otherElementClass. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - attributes: self attributes - ifNone: [self fail]) == self otherElementClass. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - attributes: self attributes - ifNone: [self fail]) == self otherElementClass. + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + attributes: self attributes + ifNone: [ self fail ]) + identicalTo: self otherElementClass. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + attributes: self attributes + ifNone: [ self fail ]) + identicalTo: self otherElementClass. mapper mapElement: 'test' namespaceURI: 'testNS' toClass: self otherElementClass. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - attributes: self attributes - ifNone: [self fail]) == self otherElementClass. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - attributes: self attributes - ifNone: [self fail]) == self otherElementClass. + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + attributes: self attributes + ifNone: [ self fail ]) + identicalTo: self otherElementClass. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + attributes: self attributes + ifNone: [ self fail ]) + identicalTo: self otherElementClass. mapper mapElement: 'test' namespaceURI: 'testNS' attributeSpec: self attributes asXMLAttributeSpec toClass: self elementClass. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - attributes: self attributes - ifNone: [self fail]) == self elementClass. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - attributes: self attributes - ifNone: [self fail]) == self elementClass. - - "QName mappings should take precedence over NCName mappings" + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + attributes: self attributes + ifNone: [ self fail ]) + identicalTo: self elementClass. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + attributes: self attributes + ifNone: [ self fail ]) + identicalTo: self elementClass. mapper mapElement: 'prefix:test' namespaceURI: 'testNS' attributeSpec: self attributes asXMLAttributeSpec toClass: self otherElementClass. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - attributes: self attributes - ifNone: [self fail]) == self elementClass. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - attributes: self attributes - ifNone: [self fail]) == self otherElementClass + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + attributes: self attributes + ifNone: [ self fail ]) + identicalTo: self elementClass. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + attributes: self attributes + ifNone: [ self fail ]) + identicalTo: self otherElementClass ] { #category : #tests } XMLBasicElementClassMapperTest >> testClassForElementNamespaceURIIfNone [ - | mapper | + | mapper | mapper := self newMapper. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - ifNone: [#none]) == #none. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - ifNone: [#none]) == #none. + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + ifNone: [ #none ]) + identicalTo: #none. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + ifNone: [ #none ]) + identicalTo: #none. - mapper - mapElement: 'test' - toClass: self otherElementClass. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - ifNone: [self fail]) == self otherElementClass. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - ifNone: [self fail]) == self otherElementClass. + mapper mapElement: 'test' toClass: self otherElementClass. + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + ifNone: [ self fail ]) + identicalTo: self otherElementClass. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + ifNone: [ self fail ]) + identicalTo: self otherElementClass. mapper mapElement: 'test' attributeSpec: self attributes asXMLAttributeSpec toClass: self otherElementClass. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - ifNone: [self fail]) == self otherElementClass. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - ifNone: [self fail]) == self otherElementClass. + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + ifNone: [ self fail ]) + identicalTo: self otherElementClass. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + ifNone: [ self fail ]) + identicalTo: self otherElementClass. mapper mapElement: 'test' namespaceURI: 'testNS' toClass: self elementClass. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - ifNone: [self fail]) == self elementClass. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - ifNone: [self fail]) == self elementClass. + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + ifNone: [ self fail ]) + identicalTo: self elementClass. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + ifNone: [ self fail ]) + identicalTo: self elementClass. mapper mapElement: 'test' namespaceURI: 'testNS' attributeSpec: self attributes asXMLAttributeSpec toClass: self otherElementClass. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - ifNone: [self fail]) == self elementClass. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - ifNone: [self fail]) == self elementClass. - - "QName mappings should take precedence over NCName mappings" + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + ifNone: [ self fail ]) + identicalTo: self elementClass. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + ifNone: [ self fail ]) + identicalTo: self elementClass. mapper mapElement: 'prefix:test' namespaceURI: 'testNS' toClass: self otherElementClass. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - ifNone: [self fail]) == self elementClass. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - ifNone: [self fail]) == self otherElementClass + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + ifNone: [ self fail ]) + identicalTo: self elementClass. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + ifNone: [ self fail ]) + identicalTo: self otherElementClass ] { #category : #tests } XMLBasicElementClassMapperTest >> testClassForElementNamespaceURILocalNameAttributes [ - | mapper | + | mapper | mapper := self newMapper. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes) isNil. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes) isNil. - - mapper - mapElement: 'test' - toClass: self otherElementClass. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes) == self otherElementClass. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes) == self otherElementClass. + self assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes) isNil. + self assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes) isNil. + + mapper mapElement: 'test' toClass: self otherElementClass. + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes) + identicalTo: self otherElementClass. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes) + identicalTo: self otherElementClass. mapper mapElement: 'test' attributeSpec: self attributes asXMLAttributeSpec toClass: self otherElementClass. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes) == self otherElementClass. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes) == self otherElementClass. + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes) + identicalTo: self otherElementClass. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes) + identicalTo: self otherElementClass. mapper mapElement: 'test' namespaceURI: 'testNS' toClass: self otherElementClass. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes) == self otherElementClass. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes) == self otherElementClass. + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes) + identicalTo: self otherElementClass. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes) + identicalTo: self otherElementClass. mapper mapElement: 'test' namespaceURI: 'testNS' attributeSpec: self attributes asXMLAttributeSpec toClass: self elementClass. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes) == self elementClass. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes) == self elementClass. - - "QName mappings should take precedence over NCName mappings" + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes) + identicalTo: self elementClass. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes) + identicalTo: self elementClass. mapper mapElement: 'prefix:test' namespaceURI: 'testNS' attributeSpec: self attributes asXMLAttributeSpec toClass: self otherElementClass. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes) == self elementClass. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes) == self otherElementClass + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes) + identicalTo: self elementClass. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes) + identicalTo: self otherElementClass ] { #category : #tests } XMLBasicElementClassMapperTest >> testClassForElementNamespaceURILocalNameAttributesIfNone [ - | mapper | + | mapper | mapper := self newMapper. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes - ifNone: [#none]) == #none. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes - ifNone: [#none]) == #none. - - mapper - mapElement: 'test' - toClass: self otherElementClass. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes - ifNone: [self fail]) == self otherElementClass. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes - ifNone: [self fail]) == self otherElementClass. + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes + ifNone: [ #none ]) + identicalTo: #none. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes + ifNone: [ #none ]) + identicalTo: #none. + + mapper mapElement: 'test' toClass: self otherElementClass. + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes + ifNone: [ self fail ]) + identicalTo: self otherElementClass. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes + ifNone: [ self fail ]) + identicalTo: self otherElementClass. mapper mapElement: 'test' attributeSpec: self attributes asXMLAttributeSpec toClass: self otherElementClass. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes - ifNone: [self fail]) == self otherElementClass. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes - ifNone: [self fail]) == self otherElementClass. + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes + ifNone: [ self fail ]) + identicalTo: self otherElementClass. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes + ifNone: [ self fail ]) + identicalTo: self otherElementClass. mapper mapElement: 'test' namespaceURI: 'testNS' toClass: self otherElementClass. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes - ifNone: [self fail]) == self otherElementClass. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes - ifNone: [self fail]) == self otherElementClass. + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes + ifNone: [ self fail ]) + identicalTo: self otherElementClass. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes + ifNone: [ self fail ]) + identicalTo: self otherElementClass. mapper mapElement: 'test' namespaceURI: 'testNS' attributeSpec: self attributes asXMLAttributeSpec toClass: self elementClass. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes - ifNone: [self fail]) == self elementClass. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes - ifNone: [self fail]) == self elementClass. - - "QName mappings should take precedence over NCName mappings" + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes + ifNone: [ self fail ]) + identicalTo: self elementClass. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes + ifNone: [ self fail ]) + identicalTo: self elementClass. mapper mapElement: 'prefix:test' namespaceURI: 'testNS' attributeSpec: self attributes asXMLAttributeSpec toClass: self otherElementClass. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes - ifNone: [self fail]) == self elementClass. - self assert: - (mapper - classForElement: 'prefix:test' - namespaceURI: 'testNS' - localName: 'test' - attributes: self attributes - ifNone: [self fail]) == self otherElementClass + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes + ifNone: [ self fail ]) + identicalTo: self elementClass. + self + assert: (mapper + classForElement: 'prefix:test' + namespaceURI: 'testNS' + localName: 'test' + attributes: self attributes + ifNone: [ self fail ]) + identicalTo: self otherElementClass ] { #category : #tests } XMLBasicElementClassMapperTest >> testCopy [ - | mapper copy | + | mapper copy | mapper := self newMapperWithMappings. copy := mapper copy. self - deny: mapper == copy; - deny: mapper elementClassMap == copy elementClassMap; + deny: mapper identicalTo: copy; + deny: mapper elementClassMap identicalTo: copy elementClassMap; assert: mapper elementClassMap equals: copy elementClassMap. mapper elementClassMap values with: copy elementClassMap values - do: [:classOrCollection :classOrCollectionCopy | - "the collection values need to be copied so any new mappings + do: [ :classOrCollection :classOrCollectionCopy | "the collection values need to be copied so any new mappings in either the copy or original don't affect the other" classOrCollection isCollection ifTrue: [ self - deny: classOrCollection == classOrCollectionCopy; - assert: classOrCollection equals: classOrCollectionCopy] + deny: classOrCollection identicalTo: classOrCollectionCopy; + assert: classOrCollection equals: classOrCollectionCopy ] ifFalse: [ - self deny: classOrCollection == classOrCollectionCopy]]. + self deny: classOrCollection identicalTo: classOrCollectionCopy ] ]. - mapper - mapElement: 'test' - toClass: self otherElementClass. - self deny: mapper elementClassMap = copy elementClassMap + mapper mapElement: 'test' toClass: self otherElementClass. + self deny: mapper elementClassMap equals: copy elementClassMap ] { #category : #tests } XMLBasicElementClassMapperTest >> testMapElementAttributeSpecToClass [ - | mapper | + | mapper | mapper := self newMapper. - self assert: - (mapper - mapElement: 'test' - attributeSpec: self attributes asXMLAttributeSpec - toClass: self elementClass) == mapper. - self assert: - (mapper - classForElement: 'test' - attributes: self attributes) == self elementClass. - - self assert: - (mapper - mapElement: 'test' - attributeSpec: self attributes asXMLAttributeSpec - toClass: self otherElementClass) == mapper. - self assert: - (mapper - classForElement: 'test' - attributes: self attributes) == self otherElementClass + self + assert: (mapper + mapElement: 'test' + attributeSpec: self attributes asXMLAttributeSpec + toClass: self elementClass) + identicalTo: mapper. + self + assert: (mapper classForElement: 'test' attributes: self attributes) + identicalTo: self elementClass. + self + assert: (mapper + mapElement: 'test' + attributeSpec: self attributes asXMLAttributeSpec + toClass: self otherElementClass) + identicalTo: mapper. + self + assert: (mapper classForElement: 'test' attributes: self attributes) + identicalTo: self otherElementClass ] { #category : #tests } XMLBasicElementClassMapperTest >> testMapElementNamespaceURIAttributeSpecToClass [ - | mapper | + | mapper | mapper := self newMapper. - self assert: - (mapper - mapElement: 'test' - namespaceURI: 'testNS' - attributeSpec: self attributes asXMLAttributeSpec - toClass: self elementClass) == mapper. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - attributes: self attributes) == self elementClass. - - self assert: - (mapper - mapElement: 'test' - namespaceURI: 'testNS' - attributeSpec: self attributes asXMLAttributeSpec - toClass: self otherElementClass) == mapper. - self assert: - (mapper - classForElement: 'test' - namespaceURI: 'testNS' - attributes: self attributes) == self otherElementClass + self + assert: (mapper + mapElement: 'test' + namespaceURI: 'testNS' + attributeSpec: self attributes asXMLAttributeSpec + toClass: self elementClass) + identicalTo: mapper. + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + attributes: self attributes) + identicalTo: self elementClass. + self + assert: (mapper + mapElement: 'test' + namespaceURI: 'testNS' + attributeSpec: self attributes asXMLAttributeSpec + toClass: self otherElementClass) + identicalTo: mapper. + self + assert: (mapper + classForElement: 'test' + namespaceURI: 'testNS' + attributes: self attributes) + identicalTo: self otherElementClass ] { #category : #tests } diff --git a/src/XML-Parser-Tests/XMLDocumentTest.class.st b/src/XML-Parser-Tests/XMLDocumentTest.class.st index 7331f90d..208962d9 100644 --- a/src/XML-Parser-Tests/XMLDocumentTest.class.st +++ b/src/XML-Parser-Tests/XMLDocumentTest.class.st @@ -362,11 +362,11 @@ XMLDocumentTest >> testValidateNoSubset [ { #category : #tests } XMLDocumentTest >> testVersion [ - | document | + | document | document := self newNode. self assert: document version isNil; - assert: (document version: 1.0) == document; - assert: document version = 1.0 + assert: (document version: 1.0) identicalTo: document; + assert: document version equals: 1.0 ] diff --git a/src/XML-Parser-Tests/XMLElementTest.class.st b/src/XML-Parser-Tests/XMLElementTest.class.st index 14516e45..cff899d8 100644 --- a/src/XML-Parser-Tests/XMLElementTest.class.st +++ b/src/XML-Parser-Tests/XMLElementTest.class.st @@ -1656,43 +1656,36 @@ XMLElementTest >> testResolvePrefixIfUnresolvable [ { #category : #tests } XMLElementTest >> testResolvePrefixesOfNamespaceURI [ - | element | + | element | element := self newNode. - self namespaces keysAndValuesDo: [:prefix :uri | + self namespaces keysAndValuesDo: [ :prefix :uri | self assert: (element resolvePrefixesOfNamespaceURI: uri) isEmpty. - element - declarePrefix: prefix - uri: uri. - self assert: - (element resolvePrefixesOfNamespaceURI: uri) = - (Set with: prefix). - - element - declarePrefix: 'newPrefix' - uri: uri. - self assert: - (element resolvePrefixesOfNamespaceURI: uri) = - (Set with: prefix with: 'newPrefix')]. + element declarePrefix: prefix uri: uri. + self + assert: (element resolvePrefixesOfNamespaceURI: uri) + equals: (Set with: prefix). - self assert: - (element resolvePrefixesOfNamespaceURI: - XMLNamespaceScope xmlNamespaceURI) = - (Set with: 'xml'). - self assert: - (element resolvePrefixesOfNamespaceURI: - XMLNamespaceScope xmlnsNamespaceURI) = - (Set with: 'xmlns'). + element declarePrefix: 'newPrefix' uri: uri. + self + assert: (element resolvePrefixesOfNamespaceURI: uri) + equals: (Set with: prefix with: 'newPrefix') ]. + self + assert: (element resolvePrefixesOfNamespaceURI: + XMLNamespaceScope xmlNamespaceURI) + equals: (Set with: 'xml'). + self + assert: (element resolvePrefixesOfNamespaceURI: + XMLNamespaceScope xmlnsNamespaceURI) + equals: (Set with: 'xmlns'). (element := self newNode) usesNamespaces: false. - self assert: - (element resolvePrefixesOfNamespaceURI: - XMLNamespaceScope xmlNamespaceURI) isEmpty. - self assert: - (element resolvePrefixesOfNamespaceURI: - XMLNamespaceScope xmlnsNamespaceURI) isEmpty. - self deny: element usesNamespaces. + self assert: (element resolvePrefixesOfNamespaceURI: + XMLNamespaceScope xmlNamespaceURI) isEmpty. + self assert: (element resolvePrefixesOfNamespaceURI: + XMLNamespaceScope xmlnsNamespaceURI) isEmpty. + self deny: element usesNamespaces ] { #category : #tests } diff --git a/src/XML-Parser-Tests/XMLEntityDeclarationTest.class.st b/src/XML-Parser-Tests/XMLEntityDeclarationTest.class.st index f11990a3..60752bb3 100644 --- a/src/XML-Parser-Tests/XMLEntityDeclarationTest.class.st +++ b/src/XML-Parser-Tests/XMLEntityDeclarationTest.class.st @@ -44,74 +44,70 @@ XMLEntityDeclarationTest >> testIsUnparsed [ { #category : #tests } XMLEntityDeclarationTest >> testName [ - | declaration | + | declaration | declaration := self newNode. self - assert: declaration name = ''; - assert: (declaration name: 'test') == declaration; - assert: declaration name = 'test' + assert: declaration name equals: ''; + assert: (declaration name: 'test') identicalTo: declaration; + assert: declaration name equals: 'test' ] { #category : #tests } XMLEntityDeclarationTest >> testNamePublicIDSystemID [ - | declaration | - declaration := - self nodeClass - name: 'one' - publicID: 'two' - systemID: 'three'. + | declaration | + declaration := self nodeClass + name: 'one' + publicID: 'two' + systemID: 'three'. self - assert: declaration class == self nodeClass; - assert: declaration name = 'one'; - assert: declaration publicID = 'two'; - assert: declaration systemID = 'three' + assert: declaration class identicalTo: self nodeClass; + assert: declaration name equals: 'one'; + assert: declaration publicID equals: 'two'; + assert: declaration systemID equals: 'three' ] { #category : #tests } XMLEntityDeclarationTest >> testNameReplacement [ - | declaration | - declaration := - self nodeClass - name: 'one' - replacement: 'two'. + | declaration | + declaration := self nodeClass name: 'one' replacement: 'two'. self - assert: declaration class == self nodeClass; - assert: declaration name = 'one'; - assert: declaration replacement = 'two' + assert: declaration class identicalTo: self nodeClass; + assert: declaration name equals: 'one'; + assert: declaration replacement equals: 'two' ] { #category : #tests } XMLEntityDeclarationTest >> testPublicID [ - | declaration | + | declaration | declaration := self newNode. self - assert: declaration publicID = ''; - assert: (declaration publicID: 'test') == declaration; - assert: declaration publicID = 'test' + assert: declaration publicID equals: ''; + assert: (declaration publicID: 'test') identicalTo: declaration; + assert: declaration publicID equals: 'test' ] { #category : #tests } XMLEntityDeclarationTest >> testReplacement [ - | declaration | + | declaration | declaration := self newNode. self - assert: declaration replacement = ''; - assert: (declaration replacement: 'test') == declaration; - assert: declaration replacement = 'test' + assert: declaration replacement equals: ''; + assert: (declaration replacement: 'test') identicalTo: declaration; + assert: declaration replacement equals: 'test' ] { #category : #tests } XMLEntityDeclarationTest >> testSystemID [ - | declaration | + | declaration | declaration := self newNode. self - assert: declaration systemID = ''; - assert: (declaration systemID: 'test') == declaration; - assert: declaration systemID = 'test' + assert: declaration systemID equals: ''; + assert: (declaration systemID: 'test') identicalTo: declaration; + assert: declaration systemID equals: 'test' ] diff --git a/src/XML-Parser-Tests/XMLNodeWithChildrenTest.class.st b/src/XML-Parser-Tests/XMLNodeWithChildrenTest.class.st index 2c17a360..e9c542ea 100644 --- a/src/XML-Parser-Tests/XMLNodeWithChildrenTest.class.st +++ b/src/XML-Parser-Tests/XMLNodeWithChildrenTest.class.st @@ -185,25 +185,25 @@ XMLNodeWithChildrenTest >> testAddNodeFirst [ { #category : #tests } XMLNodeWithChildrenTest >> testAddNodes [ - | node nodesAdded nodeWithNodes | + | node nodesAdded nodeWithNodes | node := self newNode. nodeWithNodes := self newNodeWithNodes. "adding nodes from another node should remove them from the previous node" nodesAdded := nodeWithNodes nodes copy. self - assert: (node addNodes: nodesAdded) = nodesAdded; - assert: node nodes = nodesAdded; - assert: (node nodes allSatisfy: [:each | each parent == node]); + assert: (node addNodes: nodesAdded) equals: nodesAdded; + assert: node nodes equals: nodesAdded; + assert: (node nodes allSatisfy: [ :each | each parent == node ]); deny: nodeWithNodes hasChildren. "adding already present nodes should move them in-place" nodesAdded := nodesAdded reversed. self - assert: (node addNodes: nodesAdded) = nodesAdded; - assert: node nodes = nodesAdded; - assert: (node nodes allSatisfy: [:each | each parent == node]) + assert: (node addNodes: nodesAdded) equals: nodesAdded; + assert: node nodes equals: nodesAdded; + assert: (node nodes allSatisfy: [ :each | each parent == node ]) ] { #category : #tests } diff --git a/src/XML-Parser-Tests/XMLNodeWithElementsTest.class.st b/src/XML-Parser-Tests/XMLNodeWithElementsTest.class.st index 484b89e2..c63c50e7 100644 --- a/src/XML-Parser-Tests/XMLNodeWithElementsTest.class.st +++ b/src/XML-Parser-Tests/XMLNodeWithElementsTest.class.st @@ -437,48 +437,49 @@ XMLNodeWithElementsTest >> testAddString [ { #category : #tests } XMLNodeWithElementsTest >> testAddStringNodeFactoryUse [ - | nodeWithElements firstStringNode elementNode lastStringNode | + | nodeWithElements firstStringNode elementNode lastStringNode | nodeWithElements := self newNode. firstStringNode := nodeWithElements addString: 'one'. self assert: (firstStringNode isStringNode: 'one'); - assert: nodeWithElements nodes size = 1; - assert: nodeWithElements firstNode == firstStringNode. + assert: nodeWithElements nodes size equals: 1; + assert: nodeWithElements firstNode identicalTo: firstStringNode. nodeWithElements nodeFactory: - (XMLPluggableNodeFactory new - stringNodeClass: XMLFString). + (XMLPluggableNodeFactory new stringNodeClass: XMLFString). self - assert: (nodeWithElements addString: 'two') == firstStringNode; + assert: (nodeWithElements addString: 'two') + identicalTo: firstStringNode; assert: (firstStringNode isStringNode: 'onetwo'); - assert: nodeWithElements nodes size = 1; - assert: nodeWithElements nodes first == firstStringNode. + assert: nodeWithElements nodes size equals: 1; + assert: nodeWithElements nodes first identicalTo: firstStringNode. - elementNode := nodeWithElements addNode: (self elementClass named: 'three'). + elementNode := nodeWithElements addNode: + (self elementClass named: 'three'). self assert: (elementNode isElementNamed: 'three'); - assert: nodeWithElements nodes size = 2; - assert: nodeWithElements nodes first == firstStringNode; - assert: nodeWithElements nodes second == elementNode. + assert: nodeWithElements nodes size equals: 2; + assert: nodeWithElements nodes first identicalTo: firstStringNode; + assert: nodeWithElements nodes second identicalTo: elementNode. lastStringNode := nodeWithElements addString: 'four'. self - assert: lastStringNode class == XMLFString; + assert: lastStringNode class identicalTo: XMLFString; assert: (lastStringNode isStringNode: 'four'); - assert: nodeWithElements nodes size = 3; - assert: nodeWithElements nodes first == firstStringNode; - assert: nodeWithElements nodes second == elementNode; - assert: nodeWithElements nodes third == lastStringNode. - - self - assert: (nodeWithElements addString: 'five') == lastStringNode; - assert: lastStringNode class == XMLFString; + assert: nodeWithElements nodes size equals: 3; + assert: nodeWithElements nodes first identicalTo: firstStringNode; + assert: nodeWithElements nodes second identicalTo: elementNode; + assert: nodeWithElements nodes third identicalTo: lastStringNode. + self + assert: (nodeWithElements addString: 'five') + identicalTo: lastStringNode; + assert: lastStringNode class identicalTo: XMLFString; assert: (lastStringNode isStringNode: 'fourfive'); - assert: nodeWithElements nodes size = 3; - assert: nodeWithElements nodes first == firstStringNode; - assert: nodeWithElements nodes second == elementNode; - assert: nodeWithElements nodes third == lastStringNode + assert: nodeWithElements nodes size equals: 3; + assert: nodeWithElements nodes first identicalTo: firstStringNode; + assert: nodeWithElements nodes second identicalTo: elementNode; + assert: nodeWithElements nodes third identicalTo: lastStringNode ] { #category : #tests } @@ -958,28 +959,27 @@ XMLNodeWithElementsTest >> testElementAt [ { #category : #tests } XMLNodeWithElementsTest >> testElementAtAddedInPlace [ - self newNodeWithElements allNodesDo: [:node | - node canHaveChildren - ifTrue: [ - (Array - with: node elements - with: node elements reversed) do: [:elements | | localNames qualifiedNames | - localNames := (elements collect: [:each | each localName]) asSet. - qualifiedNames := - (elements - select: [:each | each hasPrefix] - thenCollect: [:each | each name]) asSet. - node addNodes: elements. - localNames do: [:localName | - self assert: - (node elementAt: localName) = - (elements detect: [:each | each localName = localName])]. - qualifiedNames do: [:qualifiedName | - self assert: - (node elementAt: qualifiedName) = - (elements detect: [:each | - each hasPrefix - and: [each name = qualifiedName]])]]]] + + self newNodeWithElements allNodesDo: [ :node | + node canHaveChildren ifTrue: [ + (Array with: node elements with: node elements reversed) do: [ + :elements | + | localNames qualifiedNames | + localNames := (elements collect: [ :each | each localName ]) asSet. + qualifiedNames := (elements + select: [ :each | each hasPrefix ] + thenCollect: [ :each | each name ]) asSet. + node addNodes: elements. + localNames do: [ :localName | + self + assert: (node elementAt: localName) + equals: + (elements detect: [ :each | each localName = localName ]) ]. + qualifiedNames do: [ :qualifiedName | + self + assert: (node elementAt: qualifiedName) + equals: (elements detect: [ :each | + each hasPrefix and: [ each name = qualifiedName ] ]) ] ] ] ] ] { #category : #tests } diff --git a/src/XML-Parser-Tests/XMLParserTest.class.st b/src/XML-Parser-Tests/XMLParserTest.class.st index ad0d1d3a..a0561ba5 100644 --- a/src/XML-Parser-Tests/XMLParserTest.class.st +++ b/src/XML-Parser-Tests/XMLParserTest.class.st @@ -6140,8 +6140,8 @@ XMLParserTest >> testStandaloneExternalExternalEntityRedundance [ { #category : #tests } XMLParserTest >> testStandaloneExternalInternalEntity [ - | standalone notStandalone dtd document | + | standalone notStandalone dtd document | standalone := ''. notStandalone := ''. dtd := ' @@ -6152,34 +6152,35 @@ XMLParserTest >> testStandaloneExternalInternalEntity [ ]>'. self - should: [SAXHandler parse: standalone, dtd, '&name;'] + should: [ + SAXHandler parse: standalone , dtd , '&name;' ] raise: XMLValidationException. self shouldnt: [ - document := - (XMLDOMParser on: standalone, dtd, '&name;') - isValidating: false; - parseDocument] + document := (XMLDOMParser on: + standalone , dtd , '&name;') + isValidating: false; + parseDocument ] raise: XMLValidationException. - self assert: document contentString = 'value'. + self assert: document contentString equals: 'value'. self - shouldnt: [SAXHandler parse: standalone, dtd, '&otherName;'] + shouldnt: [ + SAXHandler parse: standalone , dtd , '&otherName;' ] raise: XMLValidationException. self shouldnt: [ - document := - XMLDOMParser parse: notStandalone, dtd, '&name;'] + document := XMLDOMParser parse: + notStandalone , dtd , '&name;' ] raise: XMLValidationException. - self assert: document contentString = 'value'. + self assert: document contentString = 'value' ] { #category : #tests } XMLParserTest >> testStandaloneExternalInternalEntityAttributeDefaultValue [ - | standaloneDTD document | - standaloneDTD := - ' + | standaloneDTD document | + standaloneDTD := ' ''> @@ -6188,37 +6189,32 @@ XMLParserTest >> testStandaloneExternalInternalEntityAttributeDefaultValue [ ]>'. self - should: [SAXHandler parse: standaloneDTD, ''] + should: [ SAXHandler parse: standaloneDTD , '' ] raise: XMLValidationException. self shouldnt: [ - document := - (XMLDOMParser on: standaloneDTD, '') - isValidating: false; - parseDocument] + document := (XMLDOMParser on: + standaloneDTD , '') + isValidating: false; + parseDocument ] raise: XMLValidationException. - self assert: (document root attributeAt: 'name') = 'value'. - - "Xerces doesn't flag this because the reference is only in the default - value declaration, but it probably should count because it's still an - internal (to the document) reference to an external standalone entity" + self assert: (document root attributeAt: 'name') equals: 'value'. self - should: [XMLDOMParser parse: standaloneDTD, ''] + should: [ XMLDOMParser parse: standaloneDTD , '' ] raise: XMLValidationException. self shouldnt: [ - document := - (XMLDOMParser on: standaloneDTD, '') - isValidating: false; - parseDocument] + document := (XMLDOMParser on: standaloneDTD , '') + isValidating: false; + parseDocument ] raise: XMLValidationException. - self assert: (document root attributeAt: 'name') = 'value'. + self assert: (document root attributeAt: 'name') equals: 'value' ] { #category : #tests } XMLParserTest >> testStandaloneExternalInternalEntityExternalSubset [ - | standalone notStandalone dtd subset resolver document | + | standalone notStandalone dtd subset resolver document | standalone := ''. notStandalone := ''. dtd := ''. @@ -6226,49 +6222,47 @@ XMLParserTest >> testStandaloneExternalInternalEntityExternalSubset [ '. - resolver := - DTDStaticExternalEntityResolver externalEntities: - (Array with: 'extern.dtd' -> subset). + resolver := DTDStaticExternalEntityResolver externalEntities: + (Array with: 'extern.dtd' -> subset). self should: [ - (SAXHandler on: standalone, dtd, '&name;') + (SAXHandler on: standalone , dtd , '&name;') externalEntityResolver: resolver copy; resolvesExternalEntities: true; - parseDocument] + parseDocument ] raise: XMLValidationException. self should: [ - (SAXHandler on: standalone, dtd, '&name;') + (SAXHandler on: standalone , dtd , '&name;') externalEntityResolver: resolver copy; resolvesExternalEntities: true; isValidating: false; - parseDocument] + parseDocument ] raise: XMLWellFormednessException. self shouldnt: [ - (SAXHandler on: standalone, dtd, '') + (SAXHandler on: standalone , dtd , '') externalEntityResolver: resolver copy; resolvesExternalEntities: true; - parseDocument] + parseDocument ] raise: XMLValidationException. - + self shouldnt: [ - document := - (XMLDOMParser on: notStandalone, dtd, '&name;') - externalEntityResolver: resolver copy; - resolvesExternalEntities: true; - parseDocument] + document := (XMLDOMParser on: + notStandalone , dtd , '&name;') + externalEntityResolver: resolver copy; + resolvesExternalEntities: true; + parseDocument ] raise: XMLValidationException. - self assert: document contentString = 'value'. + self assert: document contentString equals: 'value' ] { #category : #tests } XMLParserTest >> testStandaloneExternalInternalEntityRedundance [ - | standaloneXML document | - standaloneXML := - ' + | standaloneXML document | + standaloneXML := ' @@ -6278,9 +6272,9 @@ XMLParserTest >> testStandaloneExternalInternalEntityRedundance [ ]> &name;'. self - shouldnt: [document := XMLDOMParser parse: standaloneXML] + shouldnt: [ document := XMLDOMParser parse: standaloneXML ] raise: XMLValidationException. - self assert: document contentString = 'value'. + self assert: document contentString equals: 'value' ] { #category : #tests } diff --git a/src/XML-Parser-Tests/XMLStringTest.class.st b/src/XML-Parser-Tests/XMLStringTest.class.st index aa1ba8e4..3c19c629 100644 --- a/src/XML-Parser-Tests/XMLStringTest.class.st +++ b/src/XML-Parser-Tests/XMLStringTest.class.st @@ -385,21 +385,21 @@ XMLStringTest >> testSplitAt [ { #category : #tests } XMLStringTest >> testString [ - | stringNode | + | stringNode | stringNode := self nodeClass string: self markupString. self - assert: stringNode class == self nodeClass; - assert: stringNode string = self markupString. + assert: stringNode class identicalTo: self nodeClass; + assert: stringNode string equals: self markupString. stringNode := self newNode. - self assert: stringNode string = ''. + self assert: stringNode string equals: ''. stringNode string: self markupString. - self assert: stringNode string = self markupString. + self assert: stringNode string equals: self markupString. stringNode string: ''. - self assert: stringNode string = '' + self assert: stringNode string equals: '' ] { #category : #tests } diff --git a/src/XML-Parser-Tests/XMLURITest.class.st b/src/XML-Parser-Tests/XMLURITest.class.st index 120ee745..4be67f20 100644 --- a/src/XML-Parser-Tests/XMLURITest.class.st +++ b/src/XML-Parser-Tests/XMLURITest.class.st @@ -2132,26 +2132,27 @@ XMLURITest >> testReadFrom [ { #category : #tests } XMLURITest >> testScheme [ + self - assert: '' asXMLURI scheme = ''; - assert: '/' asXMLURI scheme = ''; - assert: self absolute asXMLURI scheme = ''; - assert: self absoluteDir asXMLURI scheme = ''; - assert: self absoluteDirRelativeCombined asXMLURI scheme = ''; - assert: self absoluteRelativeCombined asXMLURI scheme = ''; - assert: self domainURIString asXMLURI scheme = 'http'; - assert: self domainURIWithPortString asXMLURI scheme = 'http'; - assert: self emailURIString asXMLURI scheme = 'mailto'; - assert: self fileURIWithHostString asXMLURI scheme = 'file'; - assert: self fileURIString asXMLURI scheme = 'file'; - assert: self fragmentURIString asXMLURI scheme = ''; - assert: self fullURIString asXMLURI scheme = 'http'; - assert: self fullURIWithPortString asXMLURI scheme = 'http'; - assert: self queryURIString asXMLURI scheme = ''; - assert: self relative asXMLURI scheme = ''; - assert: self relativeAbsoluteCombined asXMLURI scheme = ''; - assert: self schemelessURIString asXMLURI scheme = ''; - assert: self schemelessURIWithPortString asXMLURI scheme = '' + assert: '' asXMLURI scheme equals: ''; + assert: '/' asXMLURI scheme equals: ''; + assert: self absolute asXMLURI scheme equals: ''; + assert: self absoluteDir asXMLURI scheme equals: ''; + assert: self absoluteDirRelativeCombined asXMLURI scheme equals: ''; + assert: self absoluteRelativeCombined asXMLURI scheme equals: ''; + assert: self domainURIString asXMLURI scheme equals: 'http'; + assert: self domainURIWithPortString asXMLURI scheme equals: 'http'; + assert: self emailURIString asXMLURI scheme equals: 'mailto'; + assert: self fileURIWithHostString asXMLURI scheme equals: 'file'; + assert: self fileURIString asXMLURI scheme equals: 'file'; + assert: self fragmentURIString asXMLURI scheme equals: ''; + assert: self fullURIString asXMLURI scheme equals: 'http'; + assert: self fullURIWithPortString asXMLURI scheme equals: 'http'; + assert: self queryURIString asXMLURI scheme equals: ''; + assert: self relative asXMLURI scheme equals: ''; + assert: self relativeAbsoluteCombined asXMLURI scheme equals: ''; + assert: self schemelessURIString asXMLURI scheme equals: ''; + assert: self schemelessURIWithPortString asXMLURI scheme equals: '' ] { #category : #tests }