예제 #1
0
        public void TestAddBatchType()
        {
            bool success1 = BatchTypeDAL.AddBatchType(type1);
            bool success2 = BatchTypeDAL.AddBatchType(type2);
            bool success3 = BatchTypeDAL.AddBatchType(type3);
            bool success4 = BatchTypeDAL.AddBatchType(type4);

            Assert.IsTrue(success1 && success2 && success3 && success4);
        }
예제 #2
0
 /// <summary>
 /// Adds the type of the batch.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <returns></returns>
 public static bool AddBatchType(BatchType type)
 {
     try
     {
         return(BatchTypeDAL.AddBatchType(type));
     }
     catch
     {
         throw;
     }
 }
예제 #3
0
        public void SetUp()
        {
            type1 = new BatchType("Test1", 12.34, 56.7, 123, null, 65, 142424);
            type2 = new BatchType("Test2", 442.2, 2521.11, 1223, 473, 765, 1212424);
            type3 = new BatchType("Test3", 675.43, 3900.03444, 123, 43, 65, 5787878);
            type4 = new BatchType("Test4", 49.03, 98.48, 123, 43, 65, null);
            BatchTypeDAL.AddBatchType(type1);
            BatchTypeDAL.AddBatchType(type2);
            BatchTypeDAL.AddBatchType(type3);
            BatchTypeDAL.AddBatchType(type4);

            _batch1 = new Batch("Machine1", Convert.ToDateTime("2001-01-01"), type1, true);
            _batch2 = new Batch("Machine2", Convert.ToDateTime("2001-01-01"), type2, true);
            _batch3 = new Batch("Machine3", Convert.ToDateTime("2001-01-01"), type3, true);
            _batch4 = new Batch("Machine4", Convert.ToDateTime("2001-01-01"), type1, true);
            _batch5 = new Batch("Machine5", Convert.ToDateTime("2001-01-01"), type1, true);
            _batch6 = new Batch("Machine6", Convert.ToDateTime("2001-01-01"), type4, false);
        }