Exemplo n.º 1
0
        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);
        });
Exemplo n.º 2
0
        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);
        }));
Exemplo n.º 3
0
 public void ReadCorrectAmountOfEntry2() => File.OpenRead(FileName).Using(stream =>
 {
     var ctd = Ctd.Read(stream);
     Assert.Equal(14, ctd.Layouts.Count);
 });
Exemplo n.º 4
0
 public void ReadCorrectAmountOfEntry1() => File.OpenRead(FileName).Using(stream =>
 {
     var ctd = Ctd.Read(stream);
     Assert.Equal(41, ctd.Messages.Count);
 });