コード例 #1
0
        public IActionResult Index()
        {
            testEntity obj   = new testEntity();
            var        tests = rep.GetTests();

            obj.lstTests  = tests.Where(s => s.RecordStatus == Constants.ACTIVE).ToList();
            ViewBag.tests = getTestsList(tests);
            return(View(obj));
        }
コード例 #2
0
        public IActionResult Index(testEntity model)
        {
            Tests t = new Tests();

            t.Name         = model.testType;
            t.TestDate     = model.testDate;
            t.RecordStatus = Constants.ACTIVE;
            t.CreatedDate  = DateTime.Now;
            t.CreatedBy    = "Test";
            t.LastUpdated  = DateTime.Now;
            t.UpdatedBy    = "Test";
            rep.SaveTest(t);
            var tests = rep.GetTests();

            model.lstTests = tests.Where(s => s.RecordStatus == Constants.ACTIVE).ToList();
            ViewBag.tests  = getTestsList(tests);
            return(View(model));
        }
コード例 #3
0
 public static void AssertAreEqual(testEntity expected, testEntity actual)
 {
     Assert.AreEqual(expected.Name, actual.Name);
     Assert.AreEqual(expected.mystring, actual.mystring);
     Assert.AreEqual(expected.Description, actual.Description);
 }