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); } }
public void GIVEN_Invalid_Username_AND_Password_WHEN_Creating_Web_Reader_THEN_Exception() { var converter = new WebXDocReader("FAKE_USER_NAME", "EVEN_FAKER_PASSWORD"); }
public void GIVEN_Valid_Username_AND_Password_WHEN_Creating_Web_Reader_THEN_No_Exception() { var converter = new WebXDocReader(Settings.Default.Username, Settings.Default.Password); }