public void SettingsToString() { string configuration = new System.Text.StringBuilder() .AppendLine("[DEFAULT]") .AppendLine("CONNECTIONTYPE=initiator") .AppendLine("BEGINSTRING=FIX.4.0") .AppendLine() .AppendLine("[SESSION]") .AppendLine("BEGINSTRING=FIX.4.2") .AppendLine("SENDERCOMPID=ISLD") .AppendLine("TARGETCOMPID=TW") .AppendLine("VALUE=1") .AppendLine() .AppendLine("[SESSION]") .AppendLine("BEGINSTRING=FIX.4.1") .AppendLine("SENDERCOMPID=ISLD") .AppendLine("TARGETCOMPID=WT") .AppendLine("VALUE=2") .ToString(); SessionSettings settings = new SessionSettings(new System.IO.StringReader(configuration)); Assert.That(settings.ToString(), Is.EqualTo(configuration)); }