Esempio n. 1
0
        public void TestClientIdField()
        {
            Span <byte> expectedAsHex = stackalloc byte[] { 0x21, 0x22, 0x23, 0x24 };
            ClientId    expected      = ClientId.ReadFrom(expectedAsHex);

            Assert.Equal(expected, ClientServerMessage.GetClientId(_bytes));
            Assert.Throws <ArgumentException>(() => ClientServerMessage.GetClientId(new Span <byte>(_bytes, 0, 11)));
        }