コード例 #1
0
        public void GetByte_InvalidOffset_ThrowsArgumentException(uint byteOffset)
        {
            IBuffer buffer = new byte[1].AsBuffer();

            AssertExtensions.Throws <ArgumentException>("byteOffset", () => WindowsRuntimeBufferExtensions.GetByte(buffer, byteOffset));
        }
コード例 #2
0
 public void GetByte_CustomBuffer_ThrowsInvalidCastExceptionException()
 {
     Assert.Throws <InvalidCastException>(() => WindowsRuntimeBufferExtensions.GetByte(new CustomBuffer(), 2));
 }
コード例 #3
0
 public void GetByte_NullBuffer_ThrowsArgumentNullException()
 {
     AssertExtensions.Throws <ArgumentNullException>("source", () => WindowsRuntimeBufferExtensions.GetByte(null, 0));
 }