コード例 #1
0
        public void GetPeriod_ShouldCall_Create_From_Repository()
        {
            mock.Setup(repository => repository.GetPeriod(It.IsAny <DateTimeOffset>(), It.IsAny <DateTimeOffset>())).Returns(new List <NetworkMetric>());

            var result = controller.GetPeriod(DateTimeOffset.Now, DateTimeOffset.Now);

            mock.Verify(repository => repository.GetPeriod(It.IsAny <DateTimeOffset>(), It.IsAny <DateTimeOffset>()));
        }