public void ConsumerWritePacketHeaderTestMethod() { HeaderReaderTest _reader = new HeaderReaderTest(m_StartPosition); PacketHeader _header = PacketHeader.GetConsumerPacketHeader(_reader); Assert.IsNotNull(_header); _header.WritePacketHeader(); }
public void ConsumerWritePacketHeaderTestMethod() { HeaderReaderTest _reader = new HeaderReaderTest(m_StartPosition); PacketHeader _header = PacketHeader.GetConsumerPacketHeader(_reader); Assert.IsNotNull(_header); _header.WritePacketHeader(); }
public void ConsumerPacketHeaderTestMethod() { HeaderReaderTest _reader = new HeaderReaderTest(m_StartPosition); PacketHeader _header = PacketHeader.GetConsumerPacketHeader(_reader); Assert.IsNotNull(_header); Assert.AreEqual<byte>((byte)((byte)m_StartPosition + 0), _header.ProtocolVersion); Assert.AreEqual<byte>((byte)((byte)m_StartPosition + 1), _header.NetworkMessageFlags); Assert.AreEqual<UInt32>((UInt32)m_StartPosition + 18, _header.SecurityTokenId); Assert.AreEqual<byte>((byte)((byte)m_StartPosition + 22), _header.NonceLength); Assert.AreEqual<Guid>(CommonDefinitions.TestGuid, _header.PublisherId); }
public void ConsumerPacketHeaderTestMethod() { HeaderReaderTest _reader = new HeaderReaderTest(m_StartPosition); PacketHeader _header = PacketHeader.GetConsumerPacketHeader(_reader); Assert.IsNotNull(_header); Assert.AreEqual <byte>((byte)((byte)m_StartPosition + 0), _header.ProtocolVersion); Assert.AreEqual <byte>((byte)((byte)m_StartPosition + 1), _header.NetworkMessageFlags); Assert.AreEqual <UInt32>((UInt32)m_StartPosition + 18, _header.SecurityTokenId); Assert.AreEqual <byte>((byte)((byte)m_StartPosition + 22), _header.NonceLength); Assert.AreEqual <Guid>(CommonDefinitions.TestGuid, _header.PublisherId); }
public void ConsumerMessageHeaderTestMethod() { HeaderReaderTest _reader = new HeaderReaderTest(); MessageHeader _header = MessageHeader.GetConsumerMessageHeader(_reader); Assert.IsNotNull(_header); _header.Synchronize(); Assert.AreEqual<ushort>(0, (byte)_header.MessageType); Assert.AreEqual<ushort>(1, _header.EncodingFlags); Assert.AreEqual<UInt32>(2, _header.MessageLength); Assert.AreEqual<ushort>(4, _header.MessageSequenceNumber); Assert.AreEqual<ushort>(6, _header.ConfigurationVersion.MajorVersion); Assert.AreEqual<ushort>(7, _header.ConfigurationVersion.MinorVersion); //Assert.AreEqual<ushort>(16, _header.FieldCount); //Assert.AreEqual<DateTime>(CommonDefinitions.TestMinimalDateTime, _header.TimeStamp); Assert.AreEqual<long>(8, _reader.m_Position); Assert.AreEqual<FieldEncodingEnum>(FieldEncodingEnum.VariantFieldEncoding, _header.FieldsEncoding); }
public void ConsumerMessageHeaderTestMethod() { HeaderReaderTest _reader = new HeaderReaderTest(); MessageHeader _header = MessageHeader.GetConsumerMessageHeader(_reader); Assert.IsNotNull(_header); _header.Synchronize(); Assert.AreEqual <ushort>(0, (byte)_header.MessageType); Assert.AreEqual <ushort>(1, _header.EncodingFlags); Assert.AreEqual <UInt32>(2, _header.MessageLength); Assert.AreEqual <ushort>(4, _header.MessageSequenceNumber); Assert.AreEqual <ushort>(6, _header.ConfigurationVersion.MajorVersion); Assert.AreEqual <ushort>(7, _header.ConfigurationVersion.MinorVersion); //Assert.AreEqual<ushort>(16, _header.FieldCount); //Assert.AreEqual<DateTime>(CommonDefinitions.TestMinimalDateTime, _header.TimeStamp); Assert.AreEqual <long>(8, _reader.m_Position); Assert.AreEqual <FieldEncodingEnum>(FieldEncodingEnum.VariantFieldEncoding, _header.FieldsEncoding); }