예제 #1
0
        public void TestEmptyRegexMatchesEmptyString()
        {
            IProjectFilter f = new FilterImpl("", "");

            Assert.True(f.Matches("", ""));
        }
예제 #2
0
        public void TestEmptyProjectRulesMatchTeam()
        {
            IProjectFilter f = new FilterImpl(null, "");

            Assert.True(f.Matches("", "foo"));
        }
예제 #3
0
        public void TestNullRulesMatchEmptyBoth()
        {
            IProjectFilter f = new FilterImpl(null, null);

            Assert.True(f.Matches("", ""));
        }
예제 #4
0
        public void TestEmptyTeamRulesMatchTeamWithNullProject()
        {
            IProjectFilter f = new FilterImpl("", null);

            Assert.True(f.Matches("foo", null));
        }
예제 #5
0
        public void TestBothNullDoesNotMatch()
        {
            IProjectFilter f = new FilterImpl(".*", ".*");

            Assert.False(f.Matches(null, null));
        }
예제 #6
0
        public void TestNullRulesMatchNullTeam()
        {
            IProjectFilter f = new FilterImpl(null, null);

            Assert.True(f.Matches(null, "foo"));
        }
예제 #7
0
        public void TestNullProjectDoesNotMatch()
        {
            IProjectFilter f = new FilterImpl(".*", ".*");

            Assert.False(f.Matches("foo", null));
        }
예제 #8
0
        public void TestNullTeamDoesNotMatch()
        {
            IProjectFilter f = new FilterImpl(".*", ".*");

            Assert.False(f.Matches(null, "foo"));
        }
예제 #9
0
        public void TestNoMatch89StyleProjectWrongBranch()
        {
            IProjectFilter f = new FilterImpl(@"\\usa$", "master");

            Assert.False(f.Matches(@"\CxServer\Foo\bar\usa", "ORG_ProjectName_dev"));
        }
예제 #10
0
        public void TestMatch89StyleProjectRightTeam()
        {
            IProjectFilter f = new FilterImpl(@"\\usa$", "master");

            Assert.True(f.Matches(@"\CxServer\Foo\bar\usa", "ORG_ProjectName_master"));
        }
예제 #11
0
        public void TestNoMatch89StyleTeam()
        {
            IProjectFilter f = new FilterImpl(@"\\usa$", null);

            Assert.False(f.Matches(@"\CxServer\Foo\bar\uk", null));
        }