public void GetConfText_GetsTwoProperties() { var contents = new TwoPropertyClass { StringProp = "Hello World", DoubleProp = 1.23 }.GetConfText("Settings"); var expected = string.Join(Environment.NewLine, "Settings.DoubleProp = 1.23", "Settings.StringProp = Hello World"); Assert.That(contents, Is.EqualTo(expected)); }
public void GetConfContents_GetsTwoPropertiesWithKey() { var contents = new TwoPropertyClass { StringProp = "Hello World", DoubleProp = 1.23 }.GetConfContents("Settings"); var expected = new Dictionary <string, string> { { "Settings.StringProp", "Hello World" }, { "Settings.DoubleProp", "1.23" } }; CollectionAssert.AreEquivalent(expected, contents); }