import DiscRecording
from PyObjCTools.TestSupport import TestCase


class TestDRDevice(TestCase):
    def testMethods(self):
        self.assertResultIsBOOL(DiscRecording.DRDevice.isValid)
        self.assertResultIsBOOL(DiscRecording.DRDevice.openTray)
        self.assertResultIsBOOL(DiscRecording.DRDevice.closeTray)
        self.assertResultIsBOOL(DiscRecording.DRDevice.ejectMedia)
        self.assertResultIsBOOL(DiscRecording.DRDevice.acquireExclusiveAccess)
        self.assertResultIsBOOL(DiscRecording.DRDevice.isEqualToDevice_)
        self.assertResultIsBOOL(DiscRecording.DRDevice.writesCD)
        self.assertResultIsBOOL(DiscRecording.DRDevice.writesDVD)
        self.assertResultIsBOOL(DiscRecording.DRDevice.mediaIsPresent)
        self.assertResultIsBOOL(DiscRecording.DRDevice.mediaIsTransitioning)
        self.assertResultIsBOOL(DiscRecording.DRDevice.mediaIsBusy)
        self.assertResultIsBOOL(DiscRecording.DRDevice.mediaIsBlank)
        self.assertResultIsBOOL(DiscRecording.DRDevice.mediaIsAppendable)
        self.assertResultIsBOOL(DiscRecording.DRDevice.mediaIsOverwritable)
        self.assertResultIsBOOL(DiscRecording.DRDevice.mediaIsErasable)
        self.assertResultIsBOOL(DiscRecording.DRDevice.mediaIsReserved)
        self.assertResultIsBOOL(DiscRecording.DRDevice.trayIsOpen)

    def testConstants(self):
        self.assertIsInstance(DiscRecording.DRDeviceBurnSpeedCD1x, float)
        self.assertIsInstance(DiscRecording.DRDeviceBurnSpeedDVD1x, float)
        self.assertIsInstance(DiscRecording.DRDeviceBurnSpeedBD1x, float)
        self.assertIsInstance(DiscRecording.DRDeviceBurnSpeedHDDVD1x, float)
        self.assertIsInstance(DiscRecording.DRDeviceBurnSpeedMax, float)

        self.assertIsInstance(DiscRecording.DRDeviceAppearedNotification, str)
        self.assertIsInstance(DiscRecording.DRDeviceDisappearedNotification, str)
        self.assertIsInstance(DiscRecording.DRDeviceStatusChangedNotification, str)
        self.assertIsInstance(DiscRecording.DRDeviceSupportLevelKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceIORegistryEntryPathKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceWriteCapabilitiesKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceVendorNameKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceProductNameKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceFirmwareRevisionKey, str)
        self.assertIsInstance(DiscRecording.DRDevicePhysicalInterconnectKey, str)
        self.assertIsInstance(
            DiscRecording.DRDevicePhysicalInterconnectLocationKey, str
        )
        self.assertIsInstance(DiscRecording.DRDeviceLoadingMechanismCanEjectKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceLoadingMechanismCanInjectKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceLoadingMechanismCanOpenKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceWriteBufferSizeKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceSupportLevelNone, str)
        self.assertIsInstance(DiscRecording.DRDeviceSupportLevelUnsupported, str)
        self.assertIsInstance(DiscRecording.DRDeviceSupportLevelVendorSupported, str)
        self.assertIsInstance(DiscRecording.DRDeviceSupportLevelAppleSupported, str)
        self.assertIsInstance(DiscRecording.DRDeviceSupportLevelAppleShipping, str)
        self.assertIsInstance(DiscRecording.DRDevicePhysicalInterconnectATAPI, str)
        self.assertIsInstance(
            DiscRecording.DRDevicePhysicalInterconnectFibreChannel, str
        )
        self.assertIsInstance(DiscRecording.DRDevicePhysicalInterconnectFireWire, str)
        self.assertIsInstance(DiscRecording.DRDevicePhysicalInterconnectSCSI, str)
        self.assertIsInstance(DiscRecording.DRDevicePhysicalInterconnectUSB, str)
        self.assertIsInstance(
            DiscRecording.DRDevicePhysicalInterconnectLocationInternal, str
        )
        self.assertIsInstance(
            DiscRecording.DRDevicePhysicalInterconnectLocationExternal, str
        )
        self.assertIsInstance(
            DiscRecording.DRDevicePhysicalInterconnectLocationUnknown, str
        )
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteCDKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteCDRKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteCDRWKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteDVDKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteDVDRKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteDVDRDualLayerKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteDVDRWKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteDVDRWDualLayerKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteDVDRAMKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteDVDPlusRKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteDVDPlusRDoubleLayerKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteDVDPlusRWKey, str)
        self.assertIsInstance(
            DiscRecording.DRDeviceCanWriteDVDPlusRWDoubleLayerKey, str
        )
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteBDKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteBDRKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteBDREKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteHDDVDKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteHDDVDRKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteHDDVDRDualLayerKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteHDDVDRAMKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteHDDVDRWKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteHDDVDRWDualLayerKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteCDTextKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteIndexPointsKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteISRCKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteCDTAOKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteCDSAOKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteCDRawKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanWriteDVDDAOKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanTestWriteCDKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanTestWriteDVDKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanUnderrunProtectCDKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCanUnderrunProtectDVDKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceIsBusyKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceIsTrayOpenKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceMaximumWriteSpeedKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceCurrentWriteSpeedKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaStateKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaInfoKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceBurnSpeedsKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceTrackRefsKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceTrackInfoKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaStateMediaPresent, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaStateInTransition, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaStateNone, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaBSDNameKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaIsBlankKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaIsAppendableKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaIsOverwritableKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaIsErasableKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaIsReservedKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaOverwritableSpaceKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaFreeSpaceKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaUsedSpaceKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaBlocksOverwritableKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaBlocksFreeKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaBlocksUsedKey, str)
        self.assertIsInstance(
            DiscRecording.DRDeviceMediaDoubleLayerL0DataZoneBlocksKey, str
        )
        self.assertIsInstance(DiscRecording.DRDeviceMediaTrackCountKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaSessionCountKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaClassKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeKey, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaClassCD, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaClassDVD, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaClassBD, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaClassHDDVD, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaClassUnknown, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeCDROM, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeCDR, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeCDRW, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeDVDROM, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeDVDRAM, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeDVDR, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeDVDRDualLayer, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeDVDRW, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeDVDRWDualLayer, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeDVDPlusR, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeDVDPlusRDoubleLayer, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeDVDPlusRW, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeDVDPlusRWDoubleLayer, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeBDR, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeBDRE, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeBDROM, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeHDDVDROM, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeHDDVDR, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeHDDVDRDualLayer, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeHDDVDRAM, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeHDDVDRW, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeHDDVDRWDualLayer, str)
        self.assertIsInstance(DiscRecording.DRDeviceMediaTypeUnknown, str)
