コード例 #1
0
        public IActionResult Index([FromHeader] string sendJson)
        {
            ViewBag.Active = "Checkin";
            List <Checkin> checkins          = CheckinDBConnector.GetCheckins(Constants.DATA_SOURCE);
            List <User>    nonCheckedinUsers = CheckinDBConnector.GetNonCheckedinUsers(Constants.DATA_SOURCE);

            UserCheckinInfo model = new UserCheckinInfo(checkins, nonCheckedinUsers);

            return(sendJson != null && sendJson.Equals("True") ? Json(model) : (IActionResult)View(model));
        }
コード例 #2
0
        public void TestCheckedinUsers()
        {
            List <Checkin> checkins = CheckinDBConnector.GetCheckins(dataSource);

            Assert.NotNull(checkins);
            Assert.NotNull(checkins[0].participant);
            Assert.NotNull(checkins[0].admin);
            Assert.Equal("*****@*****.**", checkins[0].participant.Username);
            Assert.Equal("*****@*****.**", checkins[0].admin.Username);
        }