示例#1
0
            public DatesProvider()
            {
                var invalidNumberOfDates = new AfterDateRangeToggleInvalidAfterDate();

                var afterNowToggle  = new AfterDateRangeToggleNow();
                var beforeNowToggle = new AfterDateRangeToggleBeforeNow();


                var beforeNow = DateTime.Now.AddMinutes(-10).ToLongTimeString();
                var afterNow  = DateTime.Now.AddMinutes(10).ToLongTimeString();

                _kvp = new Dictionary <string, string>
                {
                    { invalidNumberOfDates.Key, "InvalidDate" },
                    { afterNowToggle.Key, afterNow },
                    { beforeNowToggle.Key, beforeNow },
                };
            }
示例#2
0
        public void ToggleTimeIsAfterNow_ReturnsFase()
        {
            var toggle = new AfterDateRangeToggleNow(new DatesProvider());

            Assert.That(toggle.Enabled, Is.False);
        }