public void Aggregate_sum_should_return_correct_result() { var repository = new ContactRepository(); int result = repository.GetSum(); Assert.IsTrue(result > 0); }
public void Named_arguments_should_produce_correct_results() { var repository = new ContactRepository(); List<dynamic> contacts = repository.GetAllSortedByLastName(); Assert.IsNotNull(contacts); Assert.IsTrue(contacts.Count > 0); }
public void Paging_should_return_correct_results() { var repository = new ContactRepository(); dynamic pagedResult = repository.GetAllPaged(1000, 10); List<dynamic> items = (pagedResult.Items as IEnumerable<dynamic>).ToList(); Assert.IsNotNull(pagedResult); Assert.AreEqual(10, items.Count); Assert.IsTrue(pagedResult.TotalRecords > 0); Assert.IsTrue(pagedResult.TotalPages > 0); }
public void Get_schema_should_produce_metadata() { var repository = new ContactRepository(); IEnumerable<dynamic> schema = repository.GetSchema(); Assert.IsNotNull(schema); foreach (dynamic item in schema) { Debug.WriteLine(item.COLUMN_NAME + " - " + item.DATA_TYPE); } }