Esempio n. 1
0
        public void ExtendedWorkoutData_returns_pwx()
        {
            var client      = SetupFakeTpClient();
            var athlete     = SetupFakeAthlete(VALIDUSERNAME, VALIDPASSWORD, VALIDINTERNALACCOUNT);
            var fakeWorkout = FakeWorkout();
            var result      = client.GetExtendedWorkoutData(athlete, TrainingPeaksWorkoutMappings.CovertTPWorkoutToInternal(fakeWorkout));

            Assert.IsType <pwx>(result);
        }
Esempio n. 2
0
        public void Mapper_for_Custom_Returns_Custom_Workout()
        {
            Workout fakeWorkout = A.Fake <Workout>();

            fakeWorkout.WorkoutTypeDescription = "Custom";
            var internalWorkout = TrainingPeaksWorkoutMappings.CovertTPWorkoutToInternal(fakeWorkout);

            Assert.IsType <CustomWorkout>(internalWorkout);
        }
Esempio n. 3
0
        public void Test_Map_Extended_Bike_Workout_Data()
        {
            var client            = SetupFakeTpClient();
            var athlete           = SetupFakeAthlete(VALIDUSERNAME, VALIDPASSWORD, VALIDINTERNALACCOUNT);
            var fakeWorkout       = FakeWorkout();
            var fakeIntnalWorkout = TrainingPeaksWorkoutMappings.CovertTPWorkoutToInternal(fakeWorkout);
            var pwx = client.GetExtendedWorkoutData(athlete, fakeIntnalWorkout);

            fakeIntnalWorkout = TrainingPeaksWorkoutMappings.MapExtendedCycleWorkout(pwx, fakeIntnalWorkout);
            Assert.Equal(fakeIntnalWorkout.TrainingStressScore, pwx.workout[0].summarydata.tss);
        }