public void ExoticCoverageTest() { ISectionFormatter f = new ContentSectionFormatter(); Executing.This(() => f.Write(null)).Should().Throw<ArgumentNullException>(); Executing.This(() => f.Read(null)).Should().Throw<ArgumentNullException>(); f.Id.Should().Be(0x80); }
public void ExoticCoverageTest() { ISectionFormatter f = new ContentSectionFormatter(); Executing.This(() => f.Write(null)).Should().Throw <ArgumentNullException>(); Executing.This(() => f.Read(null)).Should().Throw <ArgumentNullException>(); f.Id.Should().Be(0x80); }
public void ContentSectionFormatterRoundTrip() { const string testValue = "Météo pour Paris, France. @€"; var ms = new MemoryStream(); var fio = new FileIO(ms); var fw = new FormattedWriter(fio); var wc = new WriteContext(fw); wc.Description = new TeaFileDescription(); wc.Description.ContentDescription = testValue; ISectionFormatter f = new ContentSectionFormatter(); f.Write(wc); ms.Position = 0; var fr = new FormattedReader(fio); var rc = new ReadContext(fr); f.Read(rc); rc.Description.Should().Not.Be.Null(); rc.Description.ContentDescription.Should().Be(testValue); }
public void ContentSectionFormatterRoundTrip() { const string testValue = "Météo pour Paris, France. @€"; var ms = new MemoryStream(); var fio = new FileIO(ms); var fw = new FormattedWriter(fio); var wc = new WriteContext(fw); wc.Description = new TeaFileDescription(); wc.Description.ContentDescription = testValue; ISectionFormatter f = new ContentSectionFormatter(); f.Write(wc); ms.Position = 0; var fr = new FormattedReader(fio); var rc = new ReadContext(fr); f.Read(rc); rc.Description.Should().Not.Be.Null(); rc.Description.ContentDescription.Should().Be(testValue); }