public void RefreshHintsTest3() { // Arrange var objectUnderTest = new ExerciseImportHelper(); var ex3 = new Exercise { ExerciseCode = "STAB_012_X", Name = "Standing weight shift", EasierHint = "Don't move", HarderHint = "Close your eyes" }; var hint1 = new ExerciseHint() { Id = ex3.Id, Text = "\"Look at a spot on the wall, but not too hard!\"", ExerciseID = ex3.Id }; ICollection <ExerciseHint> hints = new HashSet <ExerciseHint> { hint1 }; var importer = new ExerciseImportHelper(); var line = importer.SplitCSVLine(CSVInputex3); // Act importer.RefreshHints(ex3, line); //Assert ex3.ExerciseHints.Equals(hints); }
public void RefreshHintsTest2() { // Arrange var objectUnderTest = new ExerciseImportHelper(); var ex2 = new Exercise { ExerciseCode = "FLX_003_R", Name = "Old Calf stretch Right", EasierHint = "Easy, Partner", HarderHint = "As a diamond." }; var hint1 = new ExerciseHint() { Id = ex2.Id, Text = "Knees Straight", ExerciseID = ex2.Id }; var hint2 = new ExerciseHint() { Id = ex2.Id, Text = "Heels on the floor", ExerciseID = ex2.Id }; var hint3 = new ExerciseHint() { Id = ex2.Id, Text = "Lean forward!", ExerciseID = ex2.Id }; ICollection <ExerciseHint> hints = new HashSet <ExerciseHint> { hint1, hint2, hint3 }; var importer = new ExerciseImportHelper(); var line = importer.SplitCSVLine(CSVInputex2); // Act importer.RefreshHints(ex2, line); //Assert ex2.ExerciseHints.Equals(hints); }
public void RefreshHintsTest4() { // Arrange var objectUnderTest = new ExerciseImportHelper(); var ex4 = new Exercise { ExerciseCode = "KSA_999_X", Name = "One Finger pull-up", EasierHint = "Use two fingers", HarderHint = "Pinky Finger" }; ICollection <ExerciseHint> hints = new HashSet <ExerciseHint>(); var importer = new ExerciseImportHelper(); var line = importer.SplitCSVLine(CSVInputex4); // Act importer.RefreshHints(ex4, line); //Assert ex4.ExerciseHints.Equals(hints); }
public void RefreshHintsInExercise() { // Arrange var ex1 = new Exercise { ExerciseCode = "FLX_003_L", Name = "Old Calf stretch Left", EasierHint = "Easy, Partner", HarderHint = "As a diamond." }; var hint1 = new ExerciseHint() { Id = ex1.Id, Text = "Knees Straight", ExerciseID = ex1.Id }; var hint2 = new ExerciseHint() { Id = ex1.Id, Text = "Heels on the floor", ExerciseID = ex1.Id }; ICollection <ExerciseHint> hints = new HashSet <ExerciseHint> { hint1, hint2 }; var importer = new ExerciseImportHelper(); var line = importer.SplitCSVLine(inputTextWithCommaInHint); // Act importer.RefreshHints(ex1, line); //Assert ex1.ExerciseHints.Equals(hints); // TODO: Fix }