コード例 #1
0
ファイル: BatchDAL-Test.cs プロジェクト: alwalker/TTU
        public void TestEmptyGetAllBatches()
        {
            CleanUp();
            List <Batch> batches = BatchDAL.GetAllBatches();

            Assert.AreEqual(null, batches);
        }
コード例 #2
0
ファイル: BatchController.cs プロジェクト: alwalker/TTU
 /// <summary>
 /// Gets all batches.
 /// </summary>
 /// <returns></returns>
 public static List <Batch> GetAllBatches()
 {
     try
     {
         return(BatchDAL.GetAllBatches());
     }
     catch
     {
         throw;
     }
 }
コード例 #3
0
ファイル: BatchDAL-Test.cs プロジェクト: alwalker/TTU
        public void TestGetAllBatches()
        {
            TestAddBatch();

            List <Batch> batches = BatchDAL.GetAllBatches();

            Assert.IsTrue(_batch1.Equals(batches[0]));
            Assert.IsTrue(_batch2.Equals(batches[1]));
            Assert.IsTrue(_batch3.Equals(batches[2]));
            Assert.IsTrue(_batch4.Equals(batches[3]));
            Assert.IsTrue(_batch5.Equals(batches[4]));
            Assert.IsTrue(_batch6.Equals(batches[5]));
        }