public void Verify_that_unknown_SpecTypeName_throws_exception() { var reqIfContent = new ReqIFContent(); string unknownName = "RHEA"; Assert.That(() => ReqIfFactory.SpecTypeConstruct(unknownName, reqIfContent, this.loggerFactory), Throws.Exception.TypeOf <ArgumentException>()); }
public void VerifyThatUnkownElementAttributeValueThrowsArgumentException() { var specObject = new SpecObject(); string unknownName = "RHEA"; Assert.Throws <ArgumentException>(() => ReqIfFactory.AttributeValueConstruct(unknownName, specObject)); }
public void VerifyThatUnkownElementDataTypeDefinitionThrowsArgumentException() { var reqIfContent = new ReqIFContent(); string unknownName = "RHEA"; Assert.Throws <ArgumentException>(() => ReqIfFactory.DatatypeDefinitionConstruct(unknownName, reqIfContent)); }
public void VerifyThatUnkownElementAttributeDefinitionThrowsArgumentException() { var spectType = new SpecObjectType(); string unknownName = "RHEA"; Assert.IsNull(ReqIfFactory.AttributeDefinitionConstruct(unknownName, spectType)); }
public void Verify_That_Unkown_Element_DataTypeDefinition_Throws_ArgumentException() { var reqIfContent = new ReqIFContent(); string unknownName = "RHEA"; Assert.That(() => ReqIfFactory.DatatypeDefinitionConstruct(unknownName, reqIfContent, this.loggerFactory), Throws.Exception.TypeOf <ArgumentException>()); }
public void Verify_That_Unkown_Element_AttributeDefinition_Throws_ArgumentException() { var spectType = new SpecObjectType(); string unknownName = "RHEA"; Assert.IsNull(ReqIfFactory.AttributeDefinitionConstruct(unknownName, spectType, this.loggerFactory)); }
public void VerifyThatXmlElementNameReturnsAttributeValueBoolean() { var specObject = new SpecObject(); Assert.IsInstanceOf <AttributeValueBoolean>(ReqIfFactory.AttributeValueConstruct("ATTRIBUTE-VALUE-BOOLEAN", specObject)); Assert.IsInstanceOf <AttributeValueDate>(ReqIfFactory.AttributeValueConstruct("ATTRIBUTE-VALUE-DATE", specObject)); Assert.IsInstanceOf <AttributeValueEnumeration>(ReqIfFactory.AttributeValueConstruct("ATTRIBUTE-VALUE-ENUMERATION", specObject)); Assert.IsInstanceOf <AttributeValueInteger>(ReqIfFactory.AttributeValueConstruct("ATTRIBUTE-VALUE-INTEGER", specObject)); Assert.IsInstanceOf <AttributeValueReal>(ReqIfFactory.AttributeValueConstruct("ATTRIBUTE-VALUE-REAL", specObject)); Assert.IsInstanceOf <AttributeValueString>(ReqIfFactory.AttributeValueConstruct("ATTRIBUTE-VALUE-STRING", specObject)); Assert.IsInstanceOf <AttributeValueXHTML>(ReqIfFactory.AttributeValueConstruct("ATTRIBUTE-VALUE-XHTML", specObject)); }
public void VerifyThatXmlElementNameReturnsDataTypeDefinition() { var reqIfContent = new ReqIFContent(); Assert.IsInstanceOf <DatatypeDefinitionBoolean>(ReqIfFactory.DatatypeDefinitionConstruct("DATATYPE-DEFINITION-BOOLEAN", reqIfContent)); Assert.IsInstanceOf <DatatypeDefinitionDate>(ReqIfFactory.DatatypeDefinitionConstruct("DATATYPE-DEFINITION-DATE", reqIfContent)); Assert.IsInstanceOf <DatatypeDefinitionEnumeration>(ReqIfFactory.DatatypeDefinitionConstruct("DATATYPE-DEFINITION-ENUMERATION", reqIfContent)); Assert.IsInstanceOf <DatatypeDefinitionInteger>(ReqIfFactory.DatatypeDefinitionConstruct("DATATYPE-DEFINITION-INTEGER", reqIfContent)); Assert.IsInstanceOf <DatatypeDefinitionReal>(ReqIfFactory.DatatypeDefinitionConstruct("DATATYPE-DEFINITION-REAL", reqIfContent)); Assert.IsInstanceOf <DatatypeDefinitionString>(ReqIfFactory.DatatypeDefinitionConstruct("DATATYPE-DEFINITION-STRING", reqIfContent)); Assert.IsInstanceOf <DatatypeDefinitionXHTML>(ReqIfFactory.DatatypeDefinitionConstruct("DATATYPE-DEFINITION-XHTML", reqIfContent)); }
public void VerifyThatXmlElementNameReturnsAttributeDefinition() { var spectType = new SpecObjectType(); Assert.IsInstanceOf <AttributeDefinitionBoolean>(ReqIfFactory.AttributeDefinitionConstruct("ATTRIBUTE-DEFINITION-BOOLEAN", spectType)); Assert.IsInstanceOf <AttributeDefinitionDate>(ReqIfFactory.AttributeDefinitionConstruct("ATTRIBUTE-DEFINITION-DATE", spectType)); Assert.IsInstanceOf <AttributeDefinitionEnumeration>(ReqIfFactory.AttributeDefinitionConstruct("ATTRIBUTE-DEFINITION-ENUMERATION", spectType)); Assert.IsInstanceOf <AttributeDefinitionInteger>(ReqIfFactory.AttributeDefinitionConstruct("ATTRIBUTE-DEFINITION-INTEGER", spectType)); Assert.IsInstanceOf <AttributeDefinitionReal>(ReqIfFactory.AttributeDefinitionConstruct("ATTRIBUTE-DEFINITION-REAL", spectType)); Assert.IsInstanceOf <AttributeDefinitionString>(ReqIfFactory.AttributeDefinitionConstruct("ATTRIBUTE-DEFINITION-STRING", spectType)); Assert.IsInstanceOf <AttributeDefinitionXHTML>(ReqIfFactory.AttributeDefinitionConstruct("ATTRIBUTE-DEFINITION-XHTML", spectType)); }
public void Verify_that_SpecType_XmlName_throws_exception_for_unsupported_type() { var specType = new TestSpecType(); Assert.That(() => ReqIfFactory.XmlName(specType), Throws.Exception.TypeOf <ArgumentException>()); }
public void Verify_that_DatatypeDefinition_XmlName_throws_exception_for_unsupported_type() { var testDatatypeDefinition = new TestDatatypeDefinition(); Assert.That(() => ReqIfFactory.XmlName(testDatatypeDefinition), Throws.Exception.TypeOf <ArgumentException>()); }