예제 #1
0
 public void testGetProAndConString() {
   assertEquals("care about patient", activity.getProAndConString(1));
   assertEquals("easy to make appointment", activity.getProAndConString(5));
   assertEquals("continuity of care", activity.getProAndConString(10));
   assertEquals("don't care about patient", activity.getProAndConString(-1));
   assertEquals("hard to make appointment", activity.getProAndConString(-5));
   assertEquals("bad in continuity of care", activity.getProAndConString(-10));
 }
예제 #2
0
  public void testGetSortedIndices() {
    int[] array1 = {1, 3, 2, 2, 4};
    int[] result1 = activity.getSortedIndices(array1, 5, 3);
    assertEquals(result1[0], 5);
    assertEquals(result1[1], 2);
    assertEquals(result1[2], 3);

    int[] array2 = {1, 1, 2};
    int[] result2 = activity.getSortedIndices(array2, 3, 3);
    assertEquals(result2[0], 3);
    assertEquals(result2[1], 1);
    assertEquals(result2[2], 2);
  }
예제 #3
0
 public void testCheckMultipleReviewer() {
   activity.checkMultipleReviewer("2012-12-12 12:12:12", null, "tester");
   assertFalse(activity.isMultipleReviewer);
   activity.isMultipleReviewer = false;
   activity.checkMultipleReviewer("2012-12-12 12:12:12", "tester", "tester");
   assertTrue(activity.isMultipleReviewer);
   activity.isMultipleReviewer = false;
   activity.checkMultipleReviewer("2011-12-12 12:12:12", "tester", "tester");
   assertFalse(activity.isMultipleReviewer);
   activity.checkMultipleReviewer("2012-12-12 12:12:12", "tester", "admin");
   assertFalse(activity.isMultipleReviewer);
 }
예제 #4
0
  public void setUp() throws Exception {
    super.setUp();
    m_provider = generateProvider("testProvider", 1.300, 2.04);
    m_ratings = generateRating();
    Intent addEvent = new Intent();
    addEvent.putExtra("providers", m_provider);
    addEvent.putExtra("ratings", m_ratings);
    setActivityIntent(addEvent);
    activity = getActivity();
    buttonmap = (Button) activity.findViewById(R.id.button_providerpf_map);
    parking = (Button) activity.findViewById(R.id.provider_parking);
    creditcard = (Button) activity.findViewById(R.id.provider_creditcard);
    accepting = (Button) activity.findViewById(R.id.provider_accepting);
    appointment = (Button) activity.findViewById(R.id.provider_appointments);
    pharmacy = (Button) activity.findViewById(R.id.provider_PCP);

    name = (TextView) activity.findViewById(R.id.provider_name);
    address = (TextView) activity.findViewById(R.id.provider_address);
    phone = (TextView) activity.findViewById(R.id.provider_phone);
    philosophy = (TextView) activity.findViewById(R.id.provider_philosophy_of_care);

    rating = (TextView) activity.findViewById(R.id.providerpf_average_rating_text);
    statistics = (Button) activity.findViewById(R.id.providerpf_all_previous_reviews_button);
    rate = (Button) activity.findViewById(R.id.providerpf_rate_button);

    overallProsConsTable =
        (TableLayout) activity.findViewById(R.id.provider_overall_proscons_table);
    overallPros1 = (TextView) activity.findViewById(R.id.providerpf_overall_pro1);
    overallPros2 = (TextView) activity.findViewById(R.id.providerpf_overall_pro2);
    overallPros3 = (TextView) activity.findViewById(R.id.providerpf_overall_pro3);
    overallCons1 = (TextView) activity.findViewById(R.id.providerpf_overall_con1);
    overallCons2 = (TextView) activity.findViewById(R.id.providerpf_overall_con2);
    overallCons3 = (TextView) activity.findViewById(R.id.providerpf_overall_con3);

    expandableListView = (ExpandableListView) activity.findViewById(R.id.providerpf_comments);
  }
예제 #5
0
 public void testWithinSixMonth() {
   assertTrue(activity.withinSixMonth("2012-12-12 12:12:12"));
   assertFalse(activity.withinSixMonth("2011-12-12 12:12:12"));
 }