Пример #1
0
        private void DoTest(ElementTypeDescriptor expectedEtd, SizeIndex expectedSizeIndex, byte headerByte)
        {
            ServiceRecordParser parser = new ServiceRecordParser();
            //
            // Test the (original) individual methods.
            ElementTypeDescriptor resultEtd = ServiceRecordParser.GetElementTypeDescriptor(headerByte);

            Assert.AreEqual(expectedEtd, resultEtd);
            //
            SizeIndex resultSI = ServiceRecordParser.GetSizeIndex(headerByte);

            Assert.AreEqual(expectedSizeIndex, resultSI);
            //
            // Test the single method (which calls each of the individual methods).
            ElementTypeDescriptor resultEtd2;
            SizeIndex             resultSI2;

            ServiceRecordParser.SplitHeaderByte(headerByte, out resultEtd2, out resultSI2);
            Assert.AreEqual(expectedEtd, resultEtd2);
            Assert.AreEqual(expectedSizeIndex, resultSI2);
        }