Esempio n. 1
0
        public void ToInt32ReturnsExpectedValue()
        {
            var value = _fixture.Create <int>().AsRecordNumberValue();
            var sut   = new RecordNumber(value);

            var result = sut.ToInt32();

            Assert.Equal(value, result);
        }
Esempio n. 2
0
        public void Write(BinaryWriter writer)
        {
            if (writer == null)
            {
                throw new ArgumentNullException(nameof(writer));
            }

            writer.WriteInt32BigEndian(RecordNumber.ToInt32());
            writer.WriteInt32BigEndian(ContentLength.ToInt32());
        }
 public int CompareTo(RecordNumber other)
 {
     return(_value.CompareTo(other.ToInt32()));
 }
 public bool Equals(RecordNumber other) => _value.Equals(other.ToInt32());