Exemplo n.º 1
0
        public void DicomOtherByteTest()
        {
            var testValues = new byte[] { 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80 };

            var element = new DicomOtherByte(DicomTag.PixelData, testValues);

            TestAddElementToDatasetAsByteBuffer(element, testValues);
        }
        internal static void Get_SingleItem_ReturnsCorrectValue <T>(int index, T expected)
        {
            var element = new DicomOtherByte(
                DicomTag.PixelData,
                Enumerable.Range(0, 256).Select(i => (byte)i).ToArray());
            var actual = element.Get <T>(index);

            Assert.Equal(expected, actual);
        }
        internal static void Get_Array_ReturnsCorrectValue <T>(int index, T expected, int expectedLength)
        {
            var element = new DicomOtherByte(
                DicomTag.PixelData,
                Enumerable.Range(0, 256).Select(i => (byte)i).ToArray());
            var actual = element.Get <T[]>();

            Assert.Equal(expectedLength, actual.Length);
            Assert.Equal(expected, actual[index]);
        }