public void GIVEN_Valid_Reader_WHEN_Retrieving_Workout_Summaries_THEN_Valid_Summaries_Retrieved() { //Arrange var converter = new WebXDocReader(Settings.Default.Username, Settings.Default.Password); //Act var workouts = converter.GetWorkoutSummaries(); //Assert Assert.IsNotNull(workouts); Assert.IsNotNull(workouts.Elements()); Assert.AreNotEqual(workouts.Elements(), 0); }
public void GIVEN_Valid_Reader_WHEN_Retrieving_Workout_THEN_Valid_Workout_Retrieved() { //Arrange var converter = new WebXDocReader(Settings.Default.Username, Settings.Default.Password); //Act var workouts = converter.GetWorkoutSummaries(); foreach (var run in workouts.Descendants("run")) { var workout = converter.GetWorkout((long)run.Attribute("id")); //Assert Assert.IsNotNull(workouts); Assert.IsNotNull(workouts.Elements()); Assert.AreNotEqual(workouts.Elements(), 0); } }