Example #1
0
 // --------------------------------------------------------[]
 public ActionResult DeleteTasks()
 {
     using( var model = new DemoshopModel() ) {
         model.DeleteTasks();
         model.Message = "Tasks deleted";
     }
     return RedirectToAction( "Index" );
 }
        public void IndexTest()
        {
            var message = "";
            using( var m = new DemoshopModel() ) {
                m.DeleteTasks();
                m.CreateEbaySubmissionTask();
                m.Message = ( message = "Task [{0}] added".SafeFormat( m.StoreTasks.First().Id ) );
            }
            var model = new DemoshopModel();

            Console.WriteLine( message );

            Assert.AreEqual( 1, model.StoreTasks.Count(), "StoreTasks.Count" );
            Assert.AreEqual( message, model.Message, "Message" );

            ShowTasks( model.StoreTasks );
        }