com.example.android.sunshine.data.TestUtilities.validateCurrentRecord()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(14.1k)|赞(0)|评价(0)|浏览(70)

本文整理了Java中com.example.android.sunshine.data.TestUtilities.validateCurrentRecord()方法的一些代码示例,展示了TestUtilities.validateCurrentRecord()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TestUtilities.validateCurrentRecord()方法的具体详情如下:
包路径:com.example.android.sunshine.data.TestUtilities
类名称:TestUtilities
方法名:validateCurrentRecord

TestUtilities.validateCurrentRecord介绍

[英]This method iterates through a set of expected values and makes various assertions that will pass if our app is functioning properly.
[中]这个方法遍历一组期望值,并做出各种断言,如果我们的应用程序正常运行,这些断言就会通过。

代码示例

代码示例来源:origin: udacity/ud851-Sunshine

/**
 * Ensures there is a non empty cursor and validates the cursor's data by checking it against
 * a set of expected values. This method will then close the cursor.
 *
 * @param error          Message when an error occurs
 * @param valueCursor    The Cursor containing the actual values received from an arbitrary query
 * @param expectedValues The values we expect to receive in valueCursor
 */
static void validateThenCloseCursor(String error, Cursor valueCursor, ContentValues expectedValues) {
  assertTrue("Empty cursor returned. " + error, valueCursor.moveToFirst());
  validateCurrentRecord(error, valueCursor, expectedValues);
  valueCursor.close();
}

代码示例来源:origin: udacity/ud851-Sunshine

/**
 * Ensures there is a non empty cursor and validates the cursor's data by checking it against
 * a set of expected values. This method will then close the cursor.
 *
 * @param error          Message when an error occurs
 * @param valueCursor    The Cursor containing the actual values received from an arbitrary query
 * @param expectedValues The values we expect to receive in valueCursor
 */
static void validateThenCloseCursor(String error, Cursor valueCursor, ContentValues expectedValues) {
  assertTrue("Empty cursor returned. " + error, valueCursor.moveToFirst());
  validateCurrentRecord(error, valueCursor, expectedValues);
  valueCursor.close();
}

代码示例来源:origin: udacity/ud851-Sunshine

/**
 * Ensures there is a non empty cursor and validates the cursor's data by checking it against
 * a set of expected values. This method will then close the cursor.
 *
 * @param error          Message when an error occurs
 * @param valueCursor    The Cursor containing the actual values received from an arbitrary query
 * @param expectedValues The values we expect to receive in valueCursor
 */
static void validateThenCloseCursor(String error, Cursor valueCursor, ContentValues expectedValues) {
  assertTrue("Empty cursor returned. " + error, valueCursor.moveToFirst());
  validateCurrentRecord(error, valueCursor, expectedValues);
  valueCursor.close();
}

代码示例来源:origin: udacity/ud851-Sunshine

/**
 * Ensures there is a non empty cursor and validates the cursor's data by checking it against
 * a set of expected values. This method will then close the cursor.
 *
 * @param error          Message when an error occurs
 * @param valueCursor    The Cursor containing the actual values received from an arbitrary query
 * @param expectedValues The values we expect to receive in valueCursor
 */
static void validateThenCloseCursor(String error, Cursor valueCursor, ContentValues expectedValues) {
  assertTrue("Empty cursor returned. " + error, valueCursor.moveToFirst());
  validateCurrentRecord(error, valueCursor, expectedValues);
  valueCursor.close();
}

代码示例来源:origin: udacity/ud851-Sunshine

/**
 * Ensures there is a non empty cursor and validates the cursor's data by checking it against
 * a set of expected values. This method will then close the cursor.
 *
 * @param error          Message when an error occurs
 * @param valueCursor    The Cursor containing the actual values received from an arbitrary query
 * @param expectedValues The values we expect to receive in valueCursor
 */
static void validateThenCloseCursor(String error, Cursor valueCursor, ContentValues expectedValues) {
  assertTrue("Empty cursor returned. " + error, valueCursor.moveToFirst());
  validateCurrentRecord(error, valueCursor, expectedValues);
  valueCursor.close();
}

代码示例来源:origin: udacity/ud851-Sunshine

/**
 * Ensures there is a non empty cursor and validates the cursor's data by checking it against
 * a set of expected values. This method will then close the cursor.
 *
 * @param error          Message when an error occurs
 * @param valueCursor    The Cursor containing the actual values received from an arbitrary query
 * @param expectedValues The values we expect to receive in valueCursor
 */
static void validateThenCloseCursor(String error, Cursor valueCursor, ContentValues expectedValues) {
  assertTrue("Empty cursor returned. " + error, valueCursor.moveToFirst());
  validateCurrentRecord(error, valueCursor, expectedValues);
  valueCursor.close();
}

代码示例来源:origin: udacity/ud851-Sunshine

/**
 * Ensures there is a non empty cursor and validates the cursor's data by checking it against
 * a set of expected values. This method will then close the cursor.
 *
 * @param error          Message when an error occurs
 * @param valueCursor    The Cursor containing the actual values received from an arbitrary query
 * @param expectedValues The values we expect to receive in valueCursor
 */
static void validateThenCloseCursor(String error, Cursor valueCursor, ContentValues expectedValues) {
  assertNotNull(
      "This cursor is null. Did you make sure to register your ContentProvider in the manifest?",
      valueCursor);
  assertTrue("Empty cursor returned. " + error, valueCursor.moveToFirst());
  validateCurrentRecord(error, valueCursor, expectedValues);
  valueCursor.close();
}

代码示例来源:origin: udacity/ud851-Sunshine

/**
 * Ensures there is a non empty cursor and validates the cursor's data by checking it against
 * a set of expected values. This method will then close the cursor.
 *
 * @param error          Message when an error occurs
 * @param valueCursor    The Cursor containing the actual values received from an arbitrary query
 * @param expectedValues The values we expect to receive in valueCursor
 */
static void validateThenCloseCursor(String error, Cursor valueCursor, ContentValues expectedValues) {
  assertNotNull(
      "This cursor is null. Did you make sure to register your ContentProvider in the manifest?",
      valueCursor);
  assertTrue("Empty cursor returned. " + error, valueCursor.moveToFirst());
  validateCurrentRecord(error, valueCursor, expectedValues);
  valueCursor.close();
}

代码示例来源:origin: udacity/ud851-Sunshine

/**
 * Ensures there is a non empty cursor and validates the cursor's data by checking it against
 * a set of expected values. This method will then close the cursor.
 *
 * @param error          Message when an error occurs
 * @param valueCursor    The Cursor containing the actual values received from an arbitrary query
 * @param expectedValues The values we expect to receive in valueCursor
 */
static void validateThenCloseCursor(String error, Cursor valueCursor, ContentValues expectedValues) {
  assertNotNull(
      "This cursor is null. Did you make sure to register your ContentProvider in the manifest?",
      valueCursor);
  assertTrue("Empty cursor returned. " + error, valueCursor.moveToFirst());
  validateCurrentRecord(error, valueCursor, expectedValues);
  valueCursor.close();
}

代码示例来源:origin: udacity/ud851-Sunshine

/**
 * Ensures there is a non empty cursor and validates the cursor's data by checking it against
 * a set of expected values. This method will then close the cursor.
 *
 * @param error          Message when an error occurs
 * @param valueCursor    The Cursor containing the actual values received from an arbitrary query
 * @param expectedValues The values we expect to receive in valueCursor
 */
static void validateThenCloseCursor(String error, Cursor valueCursor, ContentValues expectedValues) {
  assertNotNull(
      "This cursor is null. Did you make sure to register your ContentProvider in the manifest?",
      valueCursor);
  assertTrue("Empty cursor returned. " + error, valueCursor.moveToFirst());
  validateCurrentRecord(error, valueCursor, expectedValues);
  valueCursor.close();
}

代码示例来源:origin: udacity/ud851-Sunshine

/**
 * Ensures there is a non empty cursor and validates the cursor's data by checking it against
 * a set of expected values. This method will then close the cursor.
 *
 * @param error          Message when an error occurs
 * @param valueCursor    The Cursor containing the actual values received from an arbitrary query
 * @param expectedValues The values we expect to receive in valueCursor
 */
static void validateThenCloseCursor(String error, Cursor valueCursor, ContentValues expectedValues) {
  assertNotNull(
      "This cursor is null. Did you make sure to register your ContentProvider in the manifest?",
      valueCursor);
  assertTrue("Empty cursor returned. " + error, valueCursor.moveToFirst());
  validateCurrentRecord(error, valueCursor, expectedValues);
  valueCursor.close();
}

代码示例来源:origin: udacity/ud851-Sunshine

/**
 * Ensures there is a non empty cursor and validates the cursor's data by checking it against
 * a set of expected values. This method will then close the cursor.
 *
 * @param error          Message when an error occurs
 * @param valueCursor    The Cursor containing the actual values received from an arbitrary query
 * @param expectedValues The values we expect to receive in valueCursor
 */
static void validateThenCloseCursor(String error, Cursor valueCursor, ContentValues expectedValues) {
  assertNotNull(
      "This cursor is null. Did you make sure to register your ContentProvider in the manifest?",
      valueCursor);
  assertTrue("Empty cursor returned. " + error, valueCursor.moveToFirst());
  validateCurrentRecord(error, valueCursor, expectedValues);
  valueCursor.close();
}

代码示例来源:origin: udacity/ud851-Sunshine

/**
 * Ensures there is a non empty cursor and validates the cursor's data by checking it against
 * a set of expected values. This method will then close the cursor.
 *
 * @param error          Message when an error occurs
 * @param valueCursor    The Cursor containing the actual values received from an arbitrary query
 * @param expectedValues The values we expect to receive in valueCursor
 */
static void validateThenCloseCursor(String error, Cursor valueCursor, ContentValues expectedValues) {
  assertNotNull(
      "This cursor is null. Did you make sure to register your ContentProvider in the manifest?",
      valueCursor);
  assertTrue("Empty cursor returned. " + error, valueCursor.moveToFirst());
  validateCurrentRecord(error, valueCursor, expectedValues);
  valueCursor.close();
}

代码示例来源:origin: udacity/ud851-Sunshine

/**
 * Ensures there is a non empty cursor and validates the cursor's data by checking it against
 * a set of expected values. This method will then close the cursor.
 *
 * @param error          Message when an error occurs
 * @param valueCursor    The Cursor containing the actual values received from an arbitrary query
 * @param expectedValues The values we expect to receive in valueCursor
 */
static void validateThenCloseCursor(String error, Cursor valueCursor, ContentValues expectedValues) {
  assertNotNull(
      "This cursor is null. Did you make sure to register your ContentProvider in the manifest?",
      valueCursor);
  assertTrue("Empty cursor returned. " + error, valueCursor.moveToFirst());
  validateCurrentRecord(error, valueCursor, expectedValues);
  valueCursor.close();
}

代码示例来源:origin: udacity/ud851-Sunshine

/**
 * Ensures there is a non empty cursor and validates the cursor's data by checking it against
 * a set of expected values. This method will then close the cursor.
 *
 * @param error          Message when an error occurs
 * @param valueCursor    The Cursor containing the actual values received from an arbitrary query
 * @param expectedValues The values we expect to receive in valueCursor
 */
static void validateThenCloseCursor(String error, Cursor valueCursor, ContentValues expectedValues) {
  assertNotNull(
      "This cursor is null. Did you make sure to register your ContentProvider in the manifest?",
      valueCursor);
  assertTrue("Empty cursor returned. " + error, valueCursor.moveToFirst());
  validateCurrentRecord(error, valueCursor, expectedValues);
  valueCursor.close();
}

代码示例来源:origin: udacity/ud851-Sunshine

/**
 * Ensures there is a non empty cursor and validates the cursor's data by checking it against
 * a set of expected values. This method will then close the cursor.
 *
 * @param error          Message when an error occurs
 * @param valueCursor    The Cursor containing the actual values received from an arbitrary query
 * @param expectedValues The values we expect to receive in valueCursor
 */
static void validateThenCloseCursor(String error, Cursor valueCursor, ContentValues expectedValues) {
  assertNotNull(
      "This cursor is null. Did you make sure to register your ContentProvider in the manifest?",
      valueCursor);
  assertTrue("Empty cursor returned. " + error, valueCursor.moveToFirst());
  validateCurrentRecord(error, valueCursor, expectedValues);
  valueCursor.close();
}

代码示例来源:origin: udacity/ud851-Sunshine

/**
 * Ensures there is a non empty cursor and validates the cursor's data by checking it against
 * a set of expected values. This method will then close the cursor.
 *
 * @param error          Message when an error occurs
 * @param valueCursor    The Cursor containing the actual values received from an arbitrary query
 * @param expectedValues The values we expect to receive in valueCursor
 */
static void validateThenCloseCursor(String error, Cursor valueCursor, ContentValues expectedValues) {
  assertNotNull(
      "This cursor is null. Did you make sure to register your ContentProvider in the manifest?",
      valueCursor);
  assertTrue("Empty cursor returned. " + error, valueCursor.moveToFirst());
  validateCurrentRecord(error, valueCursor, expectedValues);
  valueCursor.close();
}

代码示例来源:origin: udacity/ud851-Sunshine

/**
 * Ensures there is a non empty cursor and validates the cursor's data by checking it against
 * a set of expected values. This method will then close the cursor.
 *
 * @param error          Message when an error occurs
 * @param valueCursor    The Cursor containing the actual values received from an arbitrary query
 * @param expectedValues The values we expect to receive in valueCursor
 */
static void validateThenCloseCursor(String error, Cursor valueCursor, ContentValues expectedValues) {
  assertNotNull(
      "This cursor is null. Did you make sure to register your ContentProvider in the manifest?",
      valueCursor);
  assertTrue("Empty cursor returned. " + error, valueCursor.moveToFirst());
  validateCurrentRecord(error, valueCursor, expectedValues);
  valueCursor.close();
}

代码示例来源:origin: udacity/ud851-Sunshine

/**
 * Ensures there is a non empty cursor and validates the cursor's data by checking it against
 * a set of expected values. This method will then close the cursor.
 *
 * @param error          Message when an error occurs
 * @param valueCursor    The Cursor containing the actual values received from an arbitrary query
 * @param expectedValues The values we expect to receive in valueCursor
 */
static void validateThenCloseCursor(String error, Cursor valueCursor, ContentValues expectedValues) {
  assertNotNull(
      "This cursor is null. Did you make sure to register your ContentProvider in the manifest?",
      valueCursor);
  assertTrue("Empty cursor returned. " + error, valueCursor.moveToFirst());
  validateCurrentRecord(error, valueCursor, expectedValues);
  valueCursor.close();
}

代码示例来源:origin: udacity/ud851-Sunshine

/**
 * Ensures there is a non empty cursor and validates the cursor's data by checking it against
 * a set of expected values. This method will then close the cursor.
 *
 * @param error          Message when an error occurs
 * @param valueCursor    The Cursor containing the actual values received from an arbitrary query
 * @param expectedValues The values we expect to receive in valueCursor
 */
static void validateThenCloseCursor(String error, Cursor valueCursor, ContentValues expectedValues) {
  assertNotNull(
      "This cursor is null. Did you make sure to register your ContentProvider in the manifest?",
      valueCursor);
  assertTrue("Empty cursor returned. " + error, valueCursor.moveToFirst());
  validateCurrentRecord(error, valueCursor, expectedValues);
  valueCursor.close();
}

相关文章