示例#1
0
        public void XmlStringBuilder_CreateExportString_SendNullWithStringType_ExpectedEmptyString()
        {
            //arrange
            IExportBuilder xmlbuilder = new XmlStringBuilder();

            //act
            var actual = xmlbuilder.GetExportString<String>(null);

            //assert
            Assert.AreEqual(actual, String.Empty);
        }
示例#2
0
        public void XmlStringBuilder_CreateExportString_SendDynamicDataList_EqualsToSpecificStringValue()
        {
            //arrange
            IExportBuilder xmlbuilder = new XmlStringBuilder();
            var serializer = new XmlSerializer(_dynamicTranslation.GetType());
            var writer = new StringWriter();
            serializer.Serialize(writer, _dynamicTranslation);

            //act
            var actual = xmlbuilder.GetExportString(_dynamicTranslation);

            //assert
            Assert.AreEqual(actual, writer.ToString());
        }