Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package fitness.application;
- import java.time.LocalDate;
- import java.util.ArrayList;
- import java.util.Arrays;
- import org.junit.After;
- import org.junit.AfterClass;
- import org.junit.Assert;
- import org.junit.Before;
- import org.junit.BeforeClass;
- import org.junit.Test;
- import static org.junit.Assert.*;
- /**
- *
- * @author Simon Read, Simon William and James Tan
- */
- public class DatabaseControllerTest {
- public DatabaseControllerTest() {
- }
- @BeforeClass
- public static void setUpClass() {
- }
- @AfterClass
- public static void tearDownClass() {
- }
- @Before
- public void setUp() {
- }
- @After
- public void tearDown() {
- }
- /**
- * Test of getUserDashboard method, of class DatabaseController.
- */
- @Test
- public void testGetUserDashboard() {
- DatabaseController instance = new DatabaseController();
- System.out.println("getUserDashboard");
- instance.userId = 8888;
- ArrayList<ArrayList> expResult = new ArrayList<ArrayList>();
- ArrayList<String> goals = new ArrayList<String>();
- ArrayList<String> daily = new ArrayList<String>();
- goals.add("7");
- goals.add("60");
- goals.add("7000");
- goals.add("7");
- goals.add("7");
- daily.add("3");
- daily.add("0");
- daily.add("0");
- daily.add("2");
- daily.add("1");
- expResult.add(goals);
- expResult.add(daily);
- instance.date = LocalDate.parse("2017-05-03");
- instance.previousWeek = LocalDate.parse("2017-05-03").minusDays(7);
- instance.previousMonth = LocalDate.parse("2017-05-03").minusMonths(1);
- ArrayList<ArrayList> result = instance.getUserDashboard();
- instance.closeDatabase();
- assertEquals(expResult, result);
- }
- /**
- * Test of addPractitioner method, of class DatabaseController.
- */
- @Test
- public void testAddPractitioner() {
- System.out.println("addPractitioner");
- DatabaseController instance = new DatabaseController();
- int practitionerId = 07;
- String password = "jkl";
- String fName = "Bunsen";
- String lName = "Beaker";
- String[] expResult = new String[4];
- expResult[0] = practitionerId + "";
- expResult[1] = password + "";
- expResult[2] = fName + "";
- expResult[3] = lName + "";
- instance.addPractitioner(practitionerId, password, fName, lName);
- String[] result = instance.getUser(07);
- instance.closeDatabase();
- Assert.assertArrayEquals(expResult, result);
- }
- /**
- * Test of addClient method, of class DatabaseController.
- */
- @Test
- public void testAddClient() {
- DatabaseController instance = new DatabaseController();
- System.out.println("addClient");
- String password = "cookies";
- String fName = "Paul";
- String lName = "Dell'Orso";
- int age = 60;
- int pracID = 56;
- String[] expResult = new String[6];
- expResult[0] = 1000 + "";
- expResult[1] = password + "";
- expResult[2] = fName + "";
- expResult[3] = lName + "";
- expResult[4] = age + "";
- expResult[5] = pracID + "";
- instance.setUserId(pracID);
- instance.addClient(password, fName, lName, age);
- String[] result = instance.getUser(1000);
- instance.removeUser(1000);
- instance.closeDatabase();
- Assert.assertArrayEquals(expResult, result);
- }
- /**
- * This test case test the user if client Test of getUser method, of class
- * DatabaseController.
- */
- @Test
- public void testGetUser() {
- System.out.println("getUser");
- int user = 8888;
- DatabaseController instance = new DatabaseController();
- int expResult = 6;
- String[] collection = instance.getUser(user);
- int result = collection.length;
- assertEquals(expResult, result);
- instance.closeDatabase();
- }
- /**
- * This test case test the user if practitioner Test of getUser method, of
- * class DatabaseController.
- */
- @Test
- public void testGetUserPrac() {
- System.out.println("getUser");
- int user = 12;
- DatabaseController instance = new DatabaseController();
- int expResult = 4;
- String[] collection = instance.getUser(user);
- int result = collection.length;
- assertEquals(expResult, result);
- instance.closeDatabase();
- }
- //
- /**
- * Test of setUserId method, of class DatabaseController.
- */
- @Test
- public void testSetUserId() {
- System.out.println("setUserId");
- int userId = 8888;
- int expResult = userId;
- DatabaseController instance = new DatabaseController();
- instance.setUserId(userId);
- int result = instance.getUserId();
- assertEquals(expResult, result);
- instance.closeDatabase();
- }
- /**
- * Test of getUserId method, of class DatabaseController.
- */
- @Test
- public void testGetUserId() {
- System.out.println("getUserId");
- DatabaseController instance = new DatabaseController();
- int expResult = 8888;
- int userId = 8888;
- instance.setUserId(userId);
- int result = instance.getUserId();
- assertEquals(expResult, result);
- instance.closeDatabase();
- }
- /**
- * Test of getCurrentUser method, of class DatabaseController.
- */
- @Test
- public void testGetCurrentUser() {
- System.out.println("getCurrentUser");
- DatabaseController instance = new DatabaseController();
- int expResult = 6;
- instance.userId = 8888;
- String[] collection = instance.getCurrentUser();
- int result = collection.length;
- assertEquals(expResult, result);
- instance.closeDatabase();
- }
- /**
- * Test of getClients method, of class DatabaseController.
- */
- @Test
- public void testGetClients() {
- System.out.println("getClients");
- DatabaseController instance = new DatabaseController();
- instance.userId = 12;
- int expResult = 3;
- ArrayList collection = instance.getClients();
- int result = collection.size();
- assertEquals(expResult, result);
- instance.closeDatabase();
- }
- /**
- * Test of getPassword method, of class DatabaseController.
- */
- @Test
- public void testGetPassword() {
- System.out.println("getPassword");
- int userID = 8888;
- DatabaseController instance = new DatabaseController();
- String expResult = "qwe123";
- String result = instance.getPassword(userID);
- assertEquals(expResult, result);
- instance.closeDatabase();
- }
- /**
- * this is full of bads Test of removeUser method, of class
- * DatabaseController.
- */
- @Test
- public void testRemoveUser() {
- System.out.println("removeUser");
- int userId = 9876;
- DatabaseController instance = new DatabaseController();
- instance.userId = 9876;
- boolean result = false;
- boolean expResult = true;
- instance.removeUser(userId);
- String[] testUsers = instance.getUser(userId);
- if (testUsers == null) {
- //pass
- result = true;
- }
- assertEquals(expResult, result);
- instance.closeDatabase();
- }
- /**
- * Test of updatePassword method, of class DatabaseController.
- */
- @Test
- public void testUpdatePassword() {
- System.out.println("updatePassword");
- int userId = 3333;
- String newPassword = "doughnuts";
- DatabaseController instance = new DatabaseController();
- instance.updatePassword(userId, newPassword);
- String result = instance.getPassword(userId);
- String expResult = newPassword;
- assertEquals(expResult, result);
- instance.closeDatabase();
- }
- /**
- * Test of getQuery method, of class DatabaseController.
- */
- @Test
- public void testGetQuery() {
- System.out.println("getQuery");
- String query = "strength";
- DatabaseController instance = new DatabaseController();
- instance.userId = 8888;
- boolean expResult = true;
- boolean resultSize = false;
- ArrayList<String[]> result = instance.getQuery(query);
- int arrSize = result.size();
- if (arrSize > 1) {
- resultSize = true;
- }
- instance.closeDatabase();
- assertEquals(expResult, resultSize);
- }
- /**
- * Test of addStengthEntry method, of class DatabaseController.
- */
- @Test
- public void testAddStrengthEntry() {
- System.out.println("addStengthEntry");
- DatabaseController instance = new DatabaseController();
- instance.userId = 8888;
- int programId = 3888;
- String exerciseName = "Biceps Curl";
- String entryDate = "2017-05-04";
- double weight = 5.2;
- int reps = 12;
- ArrayList<String[]> strengthEntryBefore = new ArrayList<String[]>();
- ArrayList<String[]> strengthEntryAfter = new ArrayList<String[]>();
- ArrayList<String> strengthEntryValues = new ArrayList<String>();
- strengthEntryValues.add(Integer.toString(programId));
- strengthEntryValues.add(exerciseName);
- strengthEntryValues.add(entryDate);
- strengthEntryValues.add(Double.toString(weight));
- strengthEntryValues.add(Integer.toString(reps));
- strengthEntryBefore = instance.getQuery("strength");
- instance.addStengthEntry(strengthEntryValues);
- strengthEntryAfter = instance.getQuery("strength");
- String sqlQuery = "DELETE FROM strengthEntry WHERE entryDate IS '2017-05-04'";
- instance.removeQuery(sqlQuery);
- instance.closeDatabase();
- assertEquals(strengthEntryBefore.size(), strengthEntryAfter.size() - 1);
- }
- /**
- * Test of addAerobicEntry method, of class DatabaseController.
- */
- @Test
- public void testAddAerobicEntry() {
- System.out.println("addAerobicEntry");
- DatabaseController instance = new DatabaseController();
- instance.userId = 8888;
- int programId = 3889;
- String day = "Saturday";
- int minutes = 45;
- String entryDate = "2017-05-03";
- ArrayList<String[]> arrEntryBefore = new ArrayList<String[]>();
- ArrayList<String[]> arrEntryAfter = new ArrayList<String[]>();
- ArrayList<String> aerobicEntryValues = new ArrayList<String>();
- aerobicEntryValues.add(Integer.toString(programId));
- aerobicEntryValues.add(day);
- aerobicEntryValues.add(Integer.toString(minutes));
- aerobicEntryValues.add(entryDate);
- arrEntryBefore = instance.getQuery("aerobic");
- instance.addAerobicEntry(aerobicEntryValues);
- arrEntryAfter = instance.getQuery("aerobic");
- String sqlQuery = "DELETE FROM aerobicEntry WHERE entryDate IS '2017-05-03'";
- instance.removeQuery(sqlQuery);
- instance.closeDatabase();
- assertEquals(arrEntryBefore.size(), arrEntryAfter.size() - 1);
- }
- /**
- * Test of addPedometerEntry method, of class DatabaseController.
- */
- @Test
- public void testAddPedometerEntry() {
- System.out.println("addPedometerEntry");
- DatabaseController instance = new DatabaseController();
- instance.userId = 8888;
- int programId = 3889;
- String day = "Saturday";
- int steps = 45;
- String entryDate = "2017-05-03";
- ArrayList<String[]> arrEntryBefore = new ArrayList<String[]>();
- ArrayList<String[]> arrEntryAfter = new ArrayList<String[]>();
- ArrayList<String> pedometerEntryValues = new ArrayList<String>();
- pedometerEntryValues.add(Integer.toString(programId));
- pedometerEntryValues.add(day);
- pedometerEntryValues.add(Integer.toString(steps));
- pedometerEntryValues.add(entryDate);
- arrEntryBefore = instance.getQuery("pedometer");
- instance.addPedometerEntry(pedometerEntryValues);
- arrEntryAfter = instance.getQuery("pedometer");
- String sqlQuery = "DELETE FROM pedometerEntry WHERE steps IS 45";
- instance.removeQuery(sqlQuery);
- instance.closeDatabase();
- assertEquals(arrEntryBefore.size(), arrEntryAfter.size() - 1);
- }
- /**
- * Test of addBalanceEntry method, of class DatabaseController.
- */
- @Test
- public void testAddBalanceEntry() {
- System.out.println("addBalanceEntry");
- DatabaseController instance = new DatabaseController();
- instance.userId = 8888;
- int programId = 3891;
- int leftLegTime = 80;
- int rightLegTime = 80;
- String entryDate = "2017-05-03";
- ArrayList<String[]> arrEntryBefore = new ArrayList<String[]>();
- ArrayList<String[]> arrEntryAfter = new ArrayList<String[]>();
- ArrayList<String> balanceEntryValues = new ArrayList<String>();
- balanceEntryValues.add(Integer.toString(programId));
- balanceEntryValues.add(Integer.toString(leftLegTime));
- balanceEntryValues.add(Integer.toString(rightLegTime));
- balanceEntryValues.add(entryDate);
- arrEntryBefore = instance.getQuery("balance");
- instance.addBalanceEntry(balanceEntryValues);
- arrEntryAfter = instance.getQuery("balance");
- assertEquals(arrEntryBefore.size(), arrEntryAfter.size() - 1);
- String sqlQuery = "DELETE FROM balanceEntry WHERE entryDate IS '2017-05-03'";
- instance.removeQuery(sqlQuery);
- instance.closeDatabase();
- }
- /**
- * Test of addFlexibilityEntry method, of class DatabaseController.
- */
- @Test
- public void testAddFlexibilityEntry() {
- System.out.println("addFlexibilityEntry");
- DatabaseController instance = new DatabaseController();
- instance.userId = 8888;
- int programId = 3892;
- String entryDate = "2017-05-03";
- Boolean[] stretches = new Boolean[19];
- for (int i = 0; i < stretches.length; i++) {
- stretches[i] = true;
- }
- ArrayList<String[]> arrEntryBefore = new ArrayList<String[]>();
- ArrayList<String[]> arrEntryAfter = new ArrayList<String[]>();
- ArrayList<String> balanceEntryValues = new ArrayList<String>();
- balanceEntryValues.add(Integer.toString(programId));
- balanceEntryValues.add(entryDate);
- for (int j = 0; j < stretches.length; j++) {
- balanceEntryValues.add(Boolean.toString(stretches[j]));
- }
- arrEntryBefore = instance.getQuery("flexibility");
- instance.addFlexibilityEntry(balanceEntryValues);
- arrEntryAfter = instance.getQuery("flexibility");
- String sqlQuery = "DELETE FROM flexibilityEntry WHERE entryDate IS '2017-05-03'";
- instance.removeQuery(sqlQuery);
- instance.closeDatabase();
- assertEquals(arrEntryBefore.size(), arrEntryAfter.size() - 1);
- }
- /**
- * Test of addCondition method, of class DatabaseController.
- */
- @Test
- public void testAddCondition() {
- System.out.println("addCondition");
- DatabaseController instance = new DatabaseController();
- instance.userId = 8888;
- instance.newUserId = 8888;
- int userId = 8888;
- double weight = 142.42;
- int height = 180;
- Boolean[] conditions = new Boolean[10];
- for (int i = 0; i < conditions.length; i++) {
- conditions[i] = true;
- }
- String medicationType = "Gatorade";
- String otherProblem = "Kung Fu Elbow";
- ArrayList<String[]> arrEntryBefore = new ArrayList<String[]>();
- ArrayList<String[]> arrEntryAfter = new ArrayList<String[]>();
- arrEntryBefore = instance.getQuery("condition");
- instance.addCondition(weight, height, conditions, medicationType, otherProblem);
- arrEntryAfter = instance.getQuery("condition");
- assertEquals(arrEntryBefore.size(), arrEntryAfter.size() - 1);
- String sqlQuery = "DELETE FROM condition WHERE medicationType IS 'Gatorade'";
- instance.removeQuery(sqlQuery);
- instance.closeDatabase();
- }
- /**
- * Test of removeQuery method, of class DatabaseController.
- */
- @Test
- public void testRemoveQuery() {
- System.out.println("removeQuery");
- DatabaseController instance = new DatabaseController();
- instance.userId = 8888;
- int programId = 3889;
- String day = "Saturday";
- int steps = 45;
- String entryDate = "2017-05-03";
- ArrayList<String[]> arrEntryBefore = new ArrayList<String[]>();
- ArrayList<String[]> arrEntryAfter = new ArrayList<String[]>();
- ArrayList<String> pedometerEntryValues = new ArrayList<String>();
- pedometerEntryValues.add(Integer.toString(programId));
- pedometerEntryValues.add(day);
- pedometerEntryValues.add(Integer.toString(steps));
- pedometerEntryValues.add(entryDate);
- //add it to remove
- arrEntryBefore = instance.getQuery("pedometer");
- instance.addPedometerEntry(pedometerEntryValues);
- //remove querry
- String sqlQuery = "DELETE FROM pedometerEntry WHERE entryDate IS '2017-05-03'";
- instance.removeQuery(sqlQuery);
- //get querry after removed
- arrEntryAfter = instance.getQuery("pedometer");
- instance.closeDatabase();
- assertEquals(arrEntryBefore.size(), arrEntryAfter.size());
- }
- /**
- * Test of findUserGoals method, of class DatabaseController.
- */
- @Test
- public void testFindUserGoals() {
- System.out.println("findUserGoals");
- DatabaseController instance = new DatabaseController();
- instance.userId = 3456;
- int[] expResult = {1, 0, 0, 0, 1};
- int[] result = instance.findUserGoals(3456);
- assertArrayEquals(expResult, result);
- instance.closeDatabase();
- }
- /**
- * Test of getProgramId method, of class DatabaseController.
- */
- @Test
- public void testGetProgramId() {
- System.out.println("getProgramId");
- DatabaseController instance = new DatabaseController();
- instance.userId = 8888;
- String s = "strength";
- int expResult = 3888;
- int result = instance.getProgramId(s, 8888);
- assertEquals(expResult, result);
- instance.closeDatabase();
- }
- /**
- * Test of getExerciseList method, of class DatabaseController.
- */
- @Test
- public void testGetExerciseList() {
- System.out.println("getExerciseList");
- DatabaseController instance = new DatabaseController();
- ArrayList<String> expResult = new ArrayList<String>();
- expResult.add("Seated Lateral Raise");
- expResult.add("Biceps Curl");
- expResult.add("Shoulder Shrugs");
- expResult.add("One Arm Triceps");
- expResult.add("One Arm Row");
- expResult.add("Chest Press");
- expResult.add("Abdominal Crunch");
- expResult.add("Leg Extension");
- expResult.add("Bulgarian Squat");
- expResult.add("Calf Raise");
- expResult.add("Hamstring Curl");
- expResult.add("Glute Extension");
- expResult.add("Deadlift");
- expResult.add("Squat");
- ArrayList<String> result = instance.getExerciseList();
- assertEquals(expResult, result);
- instance.closeDatabase();
- }
- /**
- * Test of generateId method, of class DatabaseController.
- */
- @Test
- public void testGenerateId() {
- System.out.println("generateId");
- String s = "client";
- DatabaseController instance = new DatabaseController();
- int expResult = 1000;
- int result = instance.generateId(s);
- assertEquals(expResult, result);
- instance.closeDatabase();
- }
- /**
- * Test of setClientId method, of class DatabaseController.
- */
- @Test
- public void testSetClientId() {
- System.out.println("setClientId");
- int id = 8888;
- int expResult = id;
- DatabaseController instance = new DatabaseController();
- instance.userId = 8888;
- instance.setClientId(id);
- int result = instance.getClientId();
- assertEquals(expResult, result);
- instance.closeDatabase();
- }
- /**
- * Test of getClientId method, of class DatabaseController.
- */
- @Test
- public void testGetClientId() {
- System.out.println("getClientId");
- DatabaseController instance = new DatabaseController();
- int id = 8888;
- int expResult = id;
- instance.setClientId(id);
- int result = instance.getClientId();
- assertEquals(expResult, result);
- instance.closeDatabase();
- }
- /**
- * Test of getClientProgramsFromDb(FromDb method, of class
- * DatabaseController.
- */
- @Test
- public void testgetClientProgramsFromDb() {
- System.out.println("getClientProgramsFromDb");
- int id = 1111;
- DatabaseController instance = new DatabaseController();
- int[] expResult = {1, 1, 0, 0, 0};
- int[] result = instance.getClientProgramsFromDb(id);
- instance.closeDatabase();
- assertArrayEquals(expResult, result);
- }
- /**
- * Test of getClientProgramsFromDb method, of class DatabaseController.
- */
- @Test
- public void testGetClientPrograms() {
- System.out.println("getClientPrograms");
- int id = 1111;
- String s = "existing";
- DatabaseController instance = new DatabaseController();
- String[] expResult = {"Strength", "Aerobic"};
- String[] result = instance.getClientPrograms(id, s);
- instance.closeDatabase();
- assertArrayEquals(expResult, result);
- }
- /**
- * Test of getGoalId method, of class DatabaseController.
- */
- @Test
- public void testGetGoalId() {
- System.out.println("getGoalId");
- String exercise = "strength";
- int pid = 3888;
- int id = 8888;
- DatabaseController instance = new DatabaseController();
- instance.userId = id;
- int expResult = 5888;
- int result = instance.getGoalId(exercise, pid);
- instance.closeDatabase();
- assertEquals(expResult, result);
- }
- /**
- * Test of getProgramDateRange method, of class DatabaseController.
- */
- @Test
- public void testGetProgramDateRange() {
- System.out.println("getProgramDateRange");
- String programName = "strength";
- DatabaseController instance = new DatabaseController();
- int id = 8888;
- instance.userId = id;
- ArrayList<String> expResult = new ArrayList<String>();
- String[] strArr = {"2017-04-29", "2017-04-30", "2017-05-01", "2017-05-02", "2017-05-03",
- "2017-05-04", "2017-05-05", "2017-05-06", "2017-05-07", "2017-05-08",
- "2017-05-09", "2017-05-10", "2017-05-11", "2017-05-12", "2017-05-13",
- "2017-05-14", "2017-05-15", "2017-05-16", "2017-05-17", "2017-05-18",
- "2017-05-19", "2017-05-20", "2017-05-21", "2017-05-22", "2017-05-23",
- "2017-05-24", "2017-05-25", "2017-05-26", "2017-05-27", "2017-05-28",
- "2017-05-29", "2017-05-30", "2017-05-31", "2017-06-01", "2017-06-02"};
- for (int i = 0; i < strArr.length; i++) {
- expResult.add(strArr[i]);
- }
- ArrayList<String> result = instance.getProgramDateRange(programName);
- instance.closeDatabase();
- assertEquals(expResult, result);
- }
- /**
- * Test of addProgram method, of class DatabaseController.
- */
- @Test
- public void testAddProgram() {
- System.out.println("addProgram");
- int id = 1111;
- int type = 3;
- String dateStart = "2017-04-28";
- String dateFinish = "2017-06-01";
- String program = "pedometer";
- ArrayList<String> programArr = new ArrayList<String>();
- programArr.add(Integer.toString(id));
- programArr.add(Integer.toString(type));
- programArr.add(dateStart);
- programArr.add(dateFinish);
- for (int i = 0; i < 7; i++) {
- programArr.add("true");
- }
- DatabaseController instance = new DatabaseController();
- instance.userId = 12;
- instance.addProgram(programArr);
- int expResult = 3111;
- int result = instance.getProgramId(program, 1111);
- //remove querry
- String sqlQuery = "DELETE FROM program WHERE dateStart IS '2017-04-28'";
- instance.removeQuery(sqlQuery);
- instance.closeDatabase();
- assertEquals(expResult, result);
- }
- /**
- * Test of generateProgramId method, of class DatabaseController.
- */
- @Test
- public void testGenerateProgramId() {
- System.out.println("generateProgramId");
- int user = 1111;
- DatabaseController instance = new DatabaseController();
- instance.userId =12;
- int expResult = 3111;
- int result = instance.generateProgramId(user);
- instance.closeDatabase();
- assertEquals(expResult, result);
- }
- /**
- * Test of addGoalEntry method, of class DatabaseController.
- */
- @Test
- public void testAddGoalEntry() {
- System.out.println("addGoalEntry");
- DatabaseController instance = new DatabaseController();
- instance.setClientId(1111);
- String exercise = "strength";
- int programID = 3006;
- ArrayList<String> goalEntry = new ArrayList<String>();
- String excerName = "arms";
- int startWeight = 05;
- int endWeight = 05;
- int exceriseStartReps = 05;
- int exceriseGoalsReps =05;
- goalEntry.add(excerName);
- goalEntry.add(Integer.toString(startWeight));
- goalEntry.add(Integer.toString(endWeight));
- goalEntry.add(Integer.toString(exceriseStartReps));
- goalEntry.add(Integer.toString(exceriseGoalsReps));
- instance.addGoalEntry(exercise, goalEntry);
- int expResult = 4006;
- int result = instance.getGoalId(exercise, programID);
- System.out.println("resultzzzz" + result);
- String sqlQuery = "DELETE FROM strengthGoal WHERE goalId IS 4006";
- instance.removeQuery(sqlQuery);
- String sqlQueryTwo = "DELETE FROM myGoals WHERE goalId IS 4006";
- instance.removeQuery(sqlQueryTwo);
- instance.closeDatabase();
- assertEquals(expResult, result);
- }
- /**
- * Test of getStrengthExercise method, of class DatabaseController.
- */
- @Test
- public void testGetStrengthExercise() {
- System.out.println("getStrengthExercise");
- String exercise = "Arms";
- DatabaseController instance = new DatabaseController();
- ArrayList expResult = null;
- ArrayList result = instance.getStrengthExercise(exercise);
- instance.closeDatabase();
- assertEquals(expResult, result);
- }
- //
- // /**
- // * Test of getStrengthDays method, of class DatabaseController.
- // */
- // @Test
- // public void testGetStrengthDays() {
- // System.out.println("getStrengthDays");
- // String exercise = "";
- // DatabaseController instance = new DatabaseController();
- // boolean[] expResult = null;
- // boolean[] result = instance.getStrengthDays(exercise);
- // assertArrayEquals(expResult, result);
- // // TODO review the generated test code and remove the default call to fail.
- // fail("The test case is a prototype.");
- // }
- //
- // /**
- // * Test of editStrengthEntry method, of class DatabaseController.
- // */
- // @Test
- // public void testEditStrengthEntry() {
- // System.out.println("editStrengthEntry");
- // DatabaseController instance = new DatabaseController();
- // instance.editStrengthEntry();
- // // TODO review the generated test code and remove the default call to fail.
- // fail("The test case is a prototype.");
- // }
- //
- // /**
- // * Test of editAerobicEntry method, of class DatabaseController.
- // */
- // @Test
- // public void testEditAerobicEntry() {
- // System.out.println("editAerobicEntry");
- // DatabaseController instance = new DatabaseController();
- // instance.editAerobicEntry();
- // // TODO review the generated test code and remove the default call to fail.
- // fail("The test case is a prototype.");
- // }
- //
- // /**
- // * Test of editPedometerEntry method, of class DatabaseController.
- // */
- // @Test
- // public void testEditPedometerEntry() {
- // System.out.println("editPedometerEntry");
- // DatabaseController instance = new DatabaseController();
- // instance.editPedometerEntry();
- // // TODO review the generated test code and remove the default call to fail.
- // fail("The test case is a prototype.");
- // }
- //
- // /**
- // * Test of editBalanceEntry method, of class DatabaseController.
- // */
- // @Test
- // public void testEditBalanceEntry() {
- // System.out.println("editBalanceEntry");
- // DatabaseController instance = new DatabaseController();
- // instance.editBalanceEntry();
- // // TODO review the generated test code and remove the default call to fail.
- // fail("The test case is a prototype.");
- // }
- //
- // /**
- // * Test of editFlexibilityEntry method, of class DatabaseController.
- // */
- // @Test
- // public void testEditFlexibilityEntry() {
- // System.out.println("editFlexibilityEntry");
- // DatabaseController instance = new DatabaseController();
- // instance.editFlexibilityEntry();
- // // TODO review the generated test code and remove the default call to fail.
- // fail("The test case is a prototype.");
- // }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement