File tree Expand file tree Collapse file tree
ReqIFSharp.Tests/SpecElementWithAttributesTests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -327,5 +327,29 @@ public async Task ReadXmlAsync_UnsupportedElement_EmitsLogWarning()
327327 Assert . That ( warningEvent . Properties [ "LocalName" ] . ToString ( ) . Trim ( '"' ) ,
328328 Is . EqualTo ( "UNSUPPORTED-ELEMENT" ) ) ;
329329 }
330+
331+ [ Test ]
332+ public void Verify_that_when_is_editable_is_not_boolean_exception_is_raised ( )
333+ {
334+ var content = new ReqIFContent ( ) ;
335+ var rootSpecification = new Specification ( content , null ) { Identifier = "root" } ;
336+
337+ var specHierarchy = new SpecHierarchy ( rootSpecification , content , null )
338+ {
339+ Identifier = "hierarchy"
340+ } ;
341+
342+ var xml = """
343+ <SPEC-HIERARCHY IDENTIFIER="hierarchy" IS-EDITABLE="INCORRECT-DATA-TYPE">
344+ <OBJECT />
345+ <CHILDREN />
346+ </SPEC-HIERARCHY>
347+ """ ;
348+
349+ using var reader = XmlReader . Create ( new StringReader ( xml ) , new XmlReaderSettings { Async = false } ) ;
350+ reader . MoveToContent ( ) ;
351+
352+ Assert . That ( ( ) => specHierarchy . ReadXml ( reader ) , Throws . InstanceOf < SerializationException > ( ) ) ;
353+ }
330354 }
331355}
You can’t perform that action at this time.
0 commit comments