using System; using System.Collections.Generic; using System.Text; using NUnit.Framework; using System.IO; namespace Nexi.Platform.Tests { [TestFixture] public class PacketReading { [Test] public void ShouldParseSimpleExample() { const string c_string = @"Interest: 0.5 Content-type: text/plain Bananas."; Packet packet = Packet.FromText(new StringReader(c_string)); Assert.AreEqual(0.5, packet.Interest); Assert.AreEqual("Bananas.", packet.TextContents.Trim()); } } }