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()); }
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()); }