コード例 #1
0
        public void ShouldBeWithinRangeOfFourteenHours()
        {
            _twitterResourceAccess = new Mock<ITwitterResourceAccess>();
            var sut = new TwitterBLL(_twitterResourceAccess.Object);

            var date = DateTime.Now.ToLocalTime().AddHours(Mother.FourteenHours);
            var postedDate = sut.ParsePostedDate(date);

            Assert.InRange(postedDate.HoursFromPostedDate, 13, 15);
        }
コード例 #2
0
        public void ShouldBeWithinRangeOfOneMonth()
        {
            _twitterResourceAccess = new Mock<ITwitterResourceAccess>();
            var sut = new TwitterBLL(_twitterResourceAccess.Object);

            var date = DateTime.Now.ToLocalTime().AddMonths(Mother.OneMonth);
            var postedDate = sut.ParsePostedDate(date);

            Assert.InRange(postedDate.WeeksFromPostedDate, 3, 5);
        }
コード例 #3
0
        public void ShouldBeWithinRangeOfFiveMinutes()
        {
            _twitterResourceAccess = new Mock<ITwitterResourceAccess>();
            var sut = new TwitterBLL(_twitterResourceAccess.Object);

            var date = DateTime.Now.ToLocalTime().AddMinutes(Mother.FiveMinutes);
            var postedDate = sut.ParsePostedDate(date);

            Assert.InRange(postedDate.MinutesFromPostedDate, 3, 6);
        }