public void Writing_one_tagged_value() { const long version = 1L; const long ticks = 13123; const long value = 1345347; const string tagName = "this is a test tag value 111!!!"; var tagId = writer.GetTagId(tagName); var bytes = NoBom.GetBytes(tagName); var entry = new RingBuffer.Entry { Ticks = ticks, Value = value, Tag = tagId }; Write(entry); Assert(writer => { writer.Write(version); writer.Write(ticks); writer.Write(1); // tag count // tag entry writer.Write(tagId); writer.Write(bytes.Length); writer.Write(bytes); writer.Write(1); // entry count writer.Write(0); writer.Write(tagId); writer.Write(value); }); }
public void Writing_one_value() { const long version = 1L; const long ticks = 2; var entry = new RingBuffer.Entry { Ticks = ticks, Value = 23544345345 }; Write(entry); Assert(writer => { writer.Write(version); writer.Write(ticks); writer.Write(1); writer.Write(0); }); }
public void Writing_one_not_tagged_value() { const long version = 1L; const long ticks = 2; const long value = 3; var entry = new RingBuffer.Entry { Ticks = ticks, Value = value }; Write(entry); Assert(writer => { writer.Write(version); writer.Write(ticks); writer.Write(0); // tag count writer.Write(1); // entry count writer.Write(0); writer.Write(0); writer.Write(value); }); }