コード例 #1
0
        public async Task VisitRepository_GetCountFromDate_Test()
        {
            var date = DateTime.Today;

            var context  = new MyCompanyContext();
            int expected = context.Visits.Count(v => v.VisitDateTime >= date);

            var target = new VisitRepository(context);
            var actual = await target.GetCountFromDateAsync(string.Empty, date);

            Assert.AreEqual(expected, actual);
        }