Exemplo n.º 1
0
        public void ShouldCreateXmlCellWithEmptyData(string id, string value, string expected)
        {
            var sb     = new StringBuilder();
            var sut    = new DataTableCell(id, value);
            var writer = new XmlTextWriter(new StringWriter(sb));

            sut.WriteXml(writer);

            Assert.AreEqual($@"<Cell><ColumnUid>{id}</ColumnUid><Value /></Cell>", sb.ToString());
        }
Exemplo n.º 2
0
        public void ShouldCreateXmlCellWithGivenData()
        {
            var sb     = new StringBuilder();
            var sut    = new DataTableCell(@"id", @"value");
            var writer = new XmlTextWriter(new StringWriter(sb));

            sut.WriteXml(writer);

            Assert.AreEqual($@"<Cell><ColumnUid>id</ColumnUid><Value>value</Value></Cell>", sb.ToString());
        }