Search in sources :

Example 1 with Exercise

use of ca.dal.cs.athletemonitor.athletemonitor.Exercise in project SEProject by NicholasBarreyre.

the class TestingHelper method addTestUserExercises.

/**
 * Test helper to add test exercises to testuser
 */
public static void addTestUserExercises() {
    FirebaseDatabase database = FirebaseDatabase.getInstance();
    DatabaseReference usersReference = database.getReference("users/testuser");
    ArrayList<Exercise> testExercises = new ArrayList<>();
    testExercises.add(testExercise1);
    testExercises.add(testExercise2);
    testExercises.add(testExercise3);
    usersReference.child("userExercises").setValue(testExercises);
}
Also used : FirebaseDatabase(com.google.firebase.database.FirebaseDatabase) Exercise(ca.dal.cs.athletemonitor.athletemonitor.Exercise) DatabaseReference(com.google.firebase.database.DatabaseReference) ArrayList(java.util.ArrayList)

Aggregations

Exercise (ca.dal.cs.athletemonitor.athletemonitor.Exercise)1 DatabaseReference (com.google.firebase.database.DatabaseReference)1 FirebaseDatabase (com.google.firebase.database.FirebaseDatabase)1 ArrayList (java.util.ArrayList)1