public void VerifyThatUnkownElementDataTypeDefinitionThrowsArgumentException()
        {
            var reqIfContent = new ReqIFContent();

            string unknownName = "RHEA";

            Assert.Throws <ArgumentException>(() => ReqIfFactory.DatatypeDefinitionConstruct(unknownName, reqIfContent));
        }
Example #2
0
        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 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));
        }