Exemplo n.º 1
0
        public void GetAllStepCounts_Physiotherapist_Successful()
        {
            // Arrange
            Helpers.PhysiotherapistLogin();

            // Act
            List <StepCount> stepCounts = StepCountResource.GetAllStepCounts(2);

            // Assert
            Assert.AreEqual(2, stepCounts.Count());
        }
Exemplo n.º 2
0
        public void GetAllDizzinesses_Physiotherapist_Successful()
        {
            // Arrange
            Helpers.PhysiotherapistLogin();

            // Act
            List <Dizziness> dizzinesses = DizzinessResource.GetAllDizzinesses(2);

            // Assert
            Assert.AreEqual(2, dizzinesses.Count);
        }
Exemplo n.º 3
0
        public void GetAllJournalEntries_Physiotherapist_Successful()
        {
            // Arrange
            Helpers.PhysiotherapistLogin();

            // Act
            List <JournalEntry> journalEntries = JournalEntryResource.GetAllJournalEntries(2);

            // Assert
            Assert.AreEqual(0, journalEntries.Count);
        }
        public void GetAllRecommendations_Physiotherapist_Succesful()
        {
            // Arrange
            Helpers.PhysiotherapistLogin();

            // Act
            List <Recommendation> recommendations = RecommendationResource.GetAllRecommendations(2);

            // Assert
            Assert.AreEqual(1, recommendations.Count);
        }
Exemplo n.º 5
0
        public void GetAllJournalLogsTest_Physiotherapist_Successful()
        {
            // Arrange
            Helpers.PhysiotherapistLogin();

            // Act
            List <JournalLog> journalLogs = JournalLogResource.GetAllJournalLogs(2);

            // Assert
            Assert.AreEqual(1, journalLogs.Count());
        }
Exemplo n.º 6
0
        public void GetAllPatients_Physiotherapist_Successful()
        {
            // Arrange
            Helpers.PhysiotherapistLogin();

            // Act
            List <Patient> patients = PatientResource.GetAllPatients();

            // Assert
            Assert.AreEqual(1, patients.Count());
        }
        public void GetAllCustomExercises_Physiotherapist_Successful()
        {
            // Arrange
            Helpers.PhysiotherapistLogin();

            // Act
            List <Exercise> exercises = CustomExerciseResource.GetAllCustomExercises(2);

            // Assert
            Assert.AreEqual(1, exercises.Count());
            Assert.AreEqual(6, exercises[0].Id);
            Assert.AreEqual(7, exercises[0].AuthorId);
            Assert.AreEqual("Jumping Jacks without arms", exercises[0].Name);
            Assert.AreEqual("Do standard jumping jack but without moving your arms", exercises[0].Description);
        }
Exemplo n.º 8
0
        public void GetAllFavoriteExercises_Physiotherapist_Successful()
        {
            // Arrange
            Helpers.PhysiotherapistLogin();

            // Act
            List <Exercise> exercises = ExerciseFavoriteResource.GetAllFavoriteExercises(2);

            // Assert
            Assert.AreEqual(1, exercises.Count());
            Assert.AreEqual(2, exercises[0].Id);
            Assert.AreEqual(6, exercises[0].AuthorId);
            Assert.AreEqual("Squats", exercises[0].Name);
            Assert.AreEqual("Squat down to a 90 degree angle and then up again", exercises[0].Description);
        }
Exemplo n.º 9
0
        public void CreateExercise_Physiotherapist_Successful()
        {
            // Arrange
            Helpers.PhysiotherapistLogin();
            string exerciseName        = "Exercist Test Name";
            string exerciseDescription = "Exercise Test Description";

            // Act
            ExerciseResource.CreateExercise(exerciseName, exerciseDescription);
            Exercise exercise = ExerciseResource.GetExercise(15);

            // Assert
            Assert.AreEqual(6, exercise.AuthorId);
            Assert.AreEqual(exerciseName, exercise.Name);
            Assert.AreEqual(exerciseDescription, exercise.Description);
        }
Exemplo n.º 10
0
        public void GetPatient_Physiotherapist_Succesful()
        {
            // Arrange
            Helpers.PhysiotherapistLogin();

            // Act
            Patient patient = PatientResource.GetPatient(2);

            // Assert
            Assert.AreEqual(2, patient.Id);
            Assert.AreEqual("Kristian Magnus", patient.FirstName);
            Assert.AreEqual("Larsen", patient.LastName);
            Assert.AreEqual("*****@*****.**", patient.Email);
            Assert.AreEqual("12345678", patient.Phone);
            Assert.AreEqual(1943, ((DateTime)patient.BirthDate).Year);
            Assert.AreEqual(11, ((DateTime)patient.BirthDate).Month);
            Assert.AreEqual(7, ((DateTime)patient.BirthDate).Day);
            Assert.AreEqual(Sex.Male, patient.Sex);
            Assert.AreEqual((short)175, patient.Height);
            Assert.AreEqual((short)91, patient.Weight);
            Assert.AreEqual("1000", patient.ZipCode);
            Assert.AreEqual("DK", patient.CountryCode);
            Assert.AreEqual("Ribevej 3", patient.Address);
        }