from PyObjCTools.TestSupport import TestCase
import HealthKit


class TestHKWorkout(TestCase):
    def test_constants(self):
        self.assertIsEnumType(HealthKit.HKWorkoutActivityType)

        self.assertEqual(HealthKit.HKWorkoutActivityTypeAmericanFootball, 1)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeArchery, 2)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeAustralianFootball, 3)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeBadminton, 4)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeBaseball, 5)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeBasketball, 6)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeBowling, 7)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeBoxing, 8)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeClimbing, 9)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeCricket, 10)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeCrossTraining, 11)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeCurling, 12)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeCycling, 13)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeDance, 14)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeDanceInspiredTraining, 15)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeElliptical, 16)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeEquestrianSports, 17)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeFencing, 18)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeFishing, 19)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeFunctionalStrengthTraining, 20)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeGolf, 21)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeGymnastics, 22)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeHandball, 23)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeHiking, 24)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeHockey, 25)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeHunting, 26)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeLacrosse, 27)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeMartialArts, 28)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeMindAndBody, 29)
        self.assertEqual(
            HealthKit.HKWorkoutActivityTypeMixedMetabolicCardioTraining, 30
        )
        self.assertEqual(HealthKit.HKWorkoutActivityTypePaddleSports, 31)
        self.assertEqual(HealthKit.HKWorkoutActivityTypePlay, 32)
        self.assertEqual(HealthKit.HKWorkoutActivityTypePreparationAndRecovery, 33)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeRacquetball, 34)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeRowing, 35)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeRugby, 36)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeRunning, 37)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeSailing, 38)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeSkatingSports, 39)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeSnowSports, 40)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeSoccer, 41)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeSoftball, 42)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeSquash, 43)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeStairClimbing, 44)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeSurfingSports, 45)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeSwimming, 46)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeTableTennis, 47)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeTennis, 48)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeTrackAndField, 49)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeTraditionalStrengthTraining, 50)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeVolleyball, 51)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeWalking, 52)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeWaterFitness, 53)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeWaterPolo, 54)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeWaterSports, 55)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeWrestling, 56)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeYoga, 57)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeBarre, 58)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeCoreTraining, 59)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeCrossCountrySkiing, 60)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeDownhillSkiing, 61)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeFlexibility, 62)
        self.assertEqual(
            HealthKit.HKWorkoutActivityTypeHighIntensityIntervalTraining, 63
        )
        self.assertEqual(HealthKit.HKWorkoutActivityTypeJumpRope, 64)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeKickboxing, 65)
        self.assertEqual(HealthKit.HKWorkoutActivityTypePilates, 66)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeSnowboarding, 67)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeStairs, 68)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeStepTraining, 69)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeWheelchairWalkPace, 70)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeWheelchairRunPace, 71)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeTaiChi, 72)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeMixedCardio, 73)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeHandCycling, 74)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeDiscSports, 75)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeFitnessGaming, 76)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeCardioDance, 77)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeSocialDance, 78)
        self.assertEqual(HealthKit.HKWorkoutActivityTypePickleball, 79)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeCooldown, 80)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeSwimBikeRun, 82)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeTransition, 83)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeUnderwaterDiving, 84)
        self.assertEqual(HealthKit.HKWorkoutActivityTypeOther, 3000)

        self.assertIsEnumType(HealthKit.HKWorkoutEventType)
        self.assertEqual(HealthKit.HKWorkoutEventTypePause, 1)
        self.assertEqual(HealthKit.HKWorkoutEventTypeResume, 2)
        self.assertEqual(HealthKit.HKWorkoutEventTypeLap, 3)
        self.assertEqual(HealthKit.HKWorkoutEventTypeMarker, 4)
        self.assertEqual(HealthKit.HKWorkoutEventTypeMotionPaused, 5)
        self.assertEqual(HealthKit.HKWorkoutEventTypeMotionResumed, 6)
        self.assertEqual(HealthKit.HKWorkoutEventTypeSegment, 7)
        self.assertEqual(HealthKit.HKWorkoutEventTypePauseOrResumeRequest, 8)

        self.assertIsInstance(HealthKit.HKPredicateKeyPathWorkoutDuration, str)
        self.assertIsInstance(HealthKit.HKPredicateKeyPathWorkoutTotalDistance, str)
        self.assertIsInstance(HealthKit.HKPredicateKeyPathWorkoutTotalEnergyBurned, str)
        self.assertIsInstance(HealthKit.HKPredicateKeyPathWorkoutType, str)
        self.assertIsInstance(
            HealthKit.HKPredicateKeyPathWorkoutTotalSwimmingStrokeCount, str
        )
        self.assertIsInstance(
            HealthKit.HKPredicateKeyPathWorkoutTotalFlightsClimbed, str
        )
        self.assertIsInstance(HealthKit.HKPredicateKeyPathWorkoutSumQuantity, str)
        self.assertIsInstance(HealthKit.HKPredicateKeyPathWorkoutMinimumQuantity, str)
        self.assertIsInstance(HealthKit.HKPredicateKeyPathWorkoutMaximumQuantity, str)
        self.assertIsInstance(HealthKit.HKPredicateKeyPathWorkoutAverageQuantity, str)
        self.assertIsInstance(HealthKit.HKPredicateKeyPathWorkoutActivity, str)
        self.assertIsInstance(HealthKit.HKWorkoutSortIdentifierDuration, str)
        self.assertIsInstance(HealthKit.HKWorkoutSortIdentifierTotalDistance, str)
        self.assertIsInstance(HealthKit.HKWorkoutSortIdentifierTotalEnergyBurned, str)
        self.assertIsInstance(
            HealthKit.HKWorkoutSortIdentifierTotalSwimmingStrokeCount, str
        )
        self.assertIsInstance(HealthKit.HKWorkoutSortIdentifierTotalFlightsClimbed, str)
