public void Constructor_CommentBreakingValue_Serializes() { // Arrange const string text = "blah=test#blughablargh\ntest=blah"; // Act var data = new Eu4FileData(text); // Assert Assert.Equal(2, data.Count); Assert.Equal("test", data.One("blah")); Assert.Equal("blah", data.One("test")); }
public void Constructor_TwoFieldsWithEmptyLine_Serializes() { // Arrange const string text = "blah=test\n\ntest=blah"; // Act var data = new Eu4FileData(text); // Assert Assert.Equal(2, data.Count); Assert.Equal("test", data.One("blah")); Assert.Equal("blah", data.One("test")); }
public void Constructor_WeirdSpacing_Serializes() { // Arrange const string text = "blah = test\n test \t =blah "; // Act var data = new Eu4FileData(text); // Assert Assert.Equal(2, data.Count); Assert.Equal("test", data.One("blah")); Assert.Equal("blah", data.One("test")); }
public void Constructor_OneField_Serializes() { // Arrange const string text = "blah=test"; // Act var data = new Eu4FileData(text); // Assert Assert.Equal(1, data.Count); Assert.Equal("test", data.One("blah")); }
public void Constructor_QuotedString_Serializes() { // Arrange const string text = "blah = \"this is a test\""; // Act var data = new Eu4FileData(text); // Assert Assert.Equal(1, data.Count); Assert.Equal("\"this is a test\"", data.One("blah")); }