|
| 1 | +import unittest |
| 2 | + |
| 3 | +from src.pynwb.ndx_franklab_novela.data_acq_device import DataAcqDevice |
| 4 | + |
| 5 | + |
| 6 | +class TestDataAcqDevice(unittest.TestCase): |
| 7 | + |
| 8 | + def test_data_acq_device_successfully_created_with_optional_data(self): |
| 9 | + |
| 10 | + data_acq_device = DataAcqDevice( |
| 11 | + name='DataAcqDevice1', |
| 12 | + system='System1', |
| 13 | + amplifier='Amplifier1', |
| 14 | + adc_circuit='adc_circuit1', |
| 15 | + ) |
| 16 | + |
| 17 | + self.assertIsInstance(data_acq_device, DataAcqDevice) |
| 18 | + |
| 19 | + self.assertIsInstance(data_acq_device.name, str) |
| 20 | + self.assertIsInstance(data_acq_device.system, str) |
| 21 | + self.assertIsInstance(data_acq_device.amplifier, str) |
| 22 | + self.assertIsInstance(data_acq_device.adc_circuit, str) |
| 23 | + |
| 24 | + self.assertEqual(data_acq_device.name, 'DataAcqDevice1') |
| 25 | + self.assertEqual(data_acq_device.system, 'System1') |
| 26 | + self.assertEqual(data_acq_device.amplifier, 'Amplifier1') |
| 27 | + self.assertEqual(data_acq_device.adc_circuit, 'adc_circuit1') |
| 28 | + |
| 29 | + def test_data_acq_device_successfully_created_without_optional_data(self): |
| 30 | + |
| 31 | + data_acq_device = DataAcqDevice( |
| 32 | + name='DataAcqDevice1', |
| 33 | + system='System1' |
| 34 | + ) |
| 35 | + |
| 36 | + self.assertIsInstance(data_acq_device, DataAcqDevice) |
| 37 | + |
| 38 | + self.assertIsInstance(data_acq_device.name, str) |
| 39 | + self.assertIsInstance(data_acq_device.system, str) |
| 40 | + self.assertIsInstance(data_acq_device.amplifier, str) |
| 41 | + self.assertIsInstance(data_acq_device.adc_circuit, str) |
| 42 | + |
| 43 | + self.assertEqual(data_acq_device.name, 'DataAcqDevice1') |
| 44 | + self.assertEqual(data_acq_device.system, 'System1') |
| 45 | + self.assertEqual(data_acq_device.amplifier, '') |
| 46 | + self.assertEqual(data_acq_device.adc_circuit, '') |
| 47 | + |
0 commit comments