Esempio n. 1
0
        private void assert(PhpFileConventionMatcher matcher, string file, string[] responses)
        {
            var matches = matcher.Match(file);

            Assert.That(matches.Length, Is.EqualTo(responses.Length));
            for (int i = 0; i < matches.Length; i++)
            {
                Assert.That(matches[i], Is.EqualTo(responses[i]));
            }
        }
Esempio n. 2
0
        public void When_testpath_ends_with_star_it_will_apply_directorys_after_pattern(string file, string[] responses)
        {
            var matcher = new PhpFileConventionMatcher("/token", new[] { "Bundle/" }, new[] { "Tests*" });

            assert(matcher, file, responses);
        }
Esempio n. 3
0
        public void When_having_multiple_patterns_and_multiple_test_paths_it_will_return_all_variations(string file, string[] responses)
        {
            var matcher = new PhpFileConventionMatcher("/", new[] { "Bundle/", "Framework/" }, new[] { "Tests/1", "Tests/2" });

            assert(matcher, file, responses);
        }
Esempio n. 4
0
        public void When_given_matching_path_it_will_respond_with_test_path(string file, string[] responses)
        {
            var matcher = new PhpFileConventionMatcher("/token", new[] { "Bundle/" }, new[] { "Tests" });

            assert(matcher, file, responses);
        }