core/trunk/XMLv2__DOMErrorMonitor.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 10 Apr 2008 09:14:47 +0000
changeset 3 7909b6680107
parent 2 06f508a6f55c
child 174 76f50ac2e6a0
permissions -rw-r--r--
Loaded into & commited from 5.3.6

"{ Package: 'stx:goodies/xmlsuite/core' }"

"{ NameSpace: XMLv2 }"

Object subclass:#DOMErrorMonitor
	instanceVariableNames:'errors'
	classVariableNames:''
	poolDictionaries:''
	category:'XML Suite-Tests W3C'
!


!DOMErrorMonitor class methodsFor:'instance creation'!

new
    ^ self basicNew initialize.

    "Created: / 15-11-2005 / 13:54:07 / janfrog"
! !

!DOMErrorMonitor methodsFor:'DOM3 interface'!

assertLowerSeverityFor: aTestCase message: aString severity: anInteger

    errors do:[:error|
        (error severity >= anInteger) ifFalse:[
            aTestCase 
                assert:false
                description:(aString , ' ' , error message)                
        ]
    ]

    "Created: / 15-11-2005 / 14:00:10 / janfrog"
!

errors

    ^errors

    "Created: / 15-11-2005 / 13:56:20 / janfrog"
!

handleError: aDOMError

    errors add: aDOMError.

    ^true

    "Created: / 15-11-2005 / 13:55:56 / janfrog"
! !

!DOMErrorMonitor methodsFor:'initialization'!

initialize

    errors := OrderedCollection new

    "Modified: / 15-11-2005 / 13:54:28 / janfrog"
! !

!DOMErrorMonitor class methodsFor:'documentation'!

version
    ^ '$Header: /opt/data/cvs/stx/goodies/xmlsuite/XMLv2__DOMErrorMonitor.st,v 1.2 2005-11-15 16:14:41 vranyj1 Exp $'
! !