public void ReadStringCorrectly(int id, string expected) => File.OpenRead(FileName).Using(stream => { var ctd = Ctd.Read(stream); var str = ctd.GetString(id); Assert.Equal(expected, str); });
public void WritesBackCorrectly() => File.OpenRead(FileName).Using(stream => Helpers.AssertStream(stream, x => { var ctd = Ctd.Read(stream); var outStream = new MemoryStream(); ctd.Write(outStream); return(outStream); }));
public void ReadCorrectAmountOfEntry2() => File.OpenRead(FileName).Using(stream => { var ctd = Ctd.Read(stream); Assert.Equal(14, ctd.Layouts.Count); });
public void ReadCorrectAmountOfEntry1() => File.OpenRead(FileName).Using(stream => { var ctd = Ctd.Read(stream); Assert.Equal(41, ctd.Messages.Count); });