コード例 #1
0
        public void NextResult_MultipleResultProceededToSecondResult_ReturnsFalse()
        {
            // Setup
            string directory = Path.Combine(testDirectory, validDatabase);

            using (var reader = new HydraRingDatabaseReader(directory, query + query, 1))
            {
                reader.NextResult();

                // Call
                bool couldGetNextResult = reader.NextResult();

                // Assert
                Assert.IsFalse(couldGetNextResult);
            }
        }
コード例 #2
0
 /// <summary>
 /// Proceeds <paramref name="reader"/> to the next result in the data set.
 /// </summary>
 /// <param name="reader">The database reader.</param>
 /// <exception cref="HydraRingFileParserException">Thrown there was no other result in the data set.</exception>
 private static void ProceedOrThrow(HydraRingDatabaseReader reader)
 {
     if (!reader.NextResult())
     {
         throw new HydraRingFileParserException(Resources.IllustrationPointsParser_Parse_Could_not_read_illustration_point_data);
     }
 }
コード例 #3
0
        public void NextResult_EmptyDatabase_ReturnsFalse()
        {
            // Setup
            string directory = Path.Combine(testDirectory, emptyDatabase);

            using (var reader = new HydraRingDatabaseReader(directory, query, 1))
            {
                // Call
                bool couldGetNextResult = reader.NextResult();

                // Assert
                Assert.IsFalse(couldGetNextResult);
            }
        }