class TestRecordingDetailRecordDictionaryEncoding(unittest.TestCase):
    def setUp(self):
        self._encoder = InstrumentationSummaryDictionaryEncoder()

    def test_encoded(self):
        data = InstrumentationSummaryRecord(record_type='SWR',
                                            transaction_sequence_n=3,
                                            record_sequence_n=15,
                                            number_voices=2,
                                            standard_instrumentation_type='BQU',
                                            instrumentation_description='DESCRIPTION')

        encoded = self._encoder.encode(data)

        self.assertEqual('SWR', encoded['record_type'])
        self.assertEqual(3, encoded['transaction_sequence_n'])
        self.assertEqual(15, encoded['record_sequence_n'])
        self.assertEqual(2, encoded['number_voices'])
        self.assertEqual('BQU', encoded['standard_instrumentation_type'])
        self.assertEqual('DESCRIPTION', encoded['instrumentation_description'])
class TestRecordingDetailRecordDictionaryEncoding(unittest.TestCase):
    def setUp(self):
        self._encoder = InstrumentationSummaryDictionaryEncoder()

    def test_encoded(self):
        data = InstrumentationSummaryRecord(
            record_type='SWR',
            transaction_sequence_n=3,
            record_sequence_n=15,
            number_voices=2,
            standard_instrumentation_type='BQU',
            instrumentation_description='DESCRIPTION')

        encoded = self._encoder.encode(data)

        self.assertEqual('SWR', encoded['record_type'])
        self.assertEqual(3, encoded['transaction_sequence_n'])
        self.assertEqual(15, encoded['record_sequence_n'])
        self.assertEqual(2, encoded['number_voices'])
        self.assertEqual('BQU', encoded['standard_instrumentation_type'])
        self.assertEqual('DESCRIPTION', encoded['instrumentation_description'])
 def setUp(self):
     self._encoder = InstrumentationSummaryDictionaryEncoder()
 def setUp(self):
     self._encoder = InstrumentationSummaryDictionaryEncoder()