public void it_should_match_when_sources_have_different_case_and_timestamps_are_equal()
        {
            otherSourcePath = FlipCase(sourcePath);

            other = new NSpecTestContainer(containerDiscoverer, otherSourcePath, debugEngines, fileService);

            container.CompareTo(other).Should().Be(0);
        }
        public void it_should_be_smaller_when_other_source_is_not_found()
        {
            fileService.Exists(otherSourcePath).Returns(false);

            other = new NSpecTestContainer(containerDiscoverer, otherSourcePath, debugEngines, fileService);

            container.CompareTo(other).Should().BeNegative();
        }
        public void it_should_be_larger_when_sources_are_equal_and_timestamp_is_after_other()
        {
            var otherTimestamp = someTime.Subtract(TimeSpan.FromHours(2));

            fileService.LastModified(sourcePath).Returns(otherTimestamp);

            other = new NSpecTestContainer(containerDiscoverer, sourcePath, debugEngines, fileService);

            container.CompareTo(other).Should().BePositive();
        }
        public virtual void before_each()
        {
            autoSubstitute = new AutoSubstitute();

            containerDiscoverer = autoSubstitute.Resolve <ITestContainerDiscoverer>();

            debugEngines = new Guid[] { Guid.NewGuid(), Guid.NewGuid() };

            fileService = autoSubstitute.Resolve <IFileService>();

            someTime = new DateTime(2015, 10, 21);

            fileService.Exists(Arg.Any <string>()).Returns(true);
            fileService.LastModified(Arg.Any <string>()).Returns(someTime);

            container = new NSpecTestContainer(containerDiscoverer, sourcePath, debugEngines, fileService);
        }
        public void it_should_match_when_when_sources_are_equal_and_timestamps_are_equal()
        {
            other = new NSpecTestContainer(containerDiscoverer, sourcePath, debugEngines, fileService);

            container.CompareTo(other).Should().Be(0);
        }
        public void it_should_be_smaller_when_sources_are_different()
        {
            other = new NSpecTestContainer(containerDiscoverer, otherSourcePath, debugEngines, fileService);

            container.CompareTo(other).Should().BeNegative();
        }
        public void it_should_be_smaller_when_other_is_null()
        {
            other = null;

            container.CompareTo(other).Should().BeNegative();
        }