public void Setup() { m_temp = new TempDir(); Directory.CreateDirectory(m_temp.GetPath("CVS")); File.WriteAllText(m_temp.GetPath(@"CVS\Repository"), "module"); m_sandbox = m_temp.Path; m_branchMatcher = new InclusionMatcher(); }
public void Setup() { m_temp = new TempDir(); Directory.CreateDirectory(m_temp.GetPath("CVS")); File.WriteAllText(m_temp.GetPath(@"CVS\Repository"), "module"); m_sandbox = m_temp.Path; m_branchMatcher = new InclusionMatcher(); }
public void CaseInsensitive_IgnoresCase() { var matcher = new InclusionMatcher(ignoreCase: true); matcher.AddIncludeRule(@"xx"); var result = matcher.Match("XX"); Assert.IsTrue(result); }
public void CaseSensitive_MatchesCase() { var matcher = new InclusionMatcher(ignoreCase: false); matcher.AddIncludeRule(@"xx"); var result = matcher.Match("XX"); Assert.IsFalse(result); }
public void AddExcludeRuleFirst_IncludesByDefault() { var matcher = new InclusionMatcher(); matcher.AddExcludeRule(@"xx"); var result = matcher.Match("blah"); Assert.IsTrue(result); }
public void AddIncludeThenExclude_Matches() { var matcher = new InclusionMatcher(); matcher.AddIncludeRule(@"xx"); matcher.AddExcludeRule(@"yy"); var result = matcher.Match("aaxx"); Assert.IsTrue(result); result = matcher.Match("xxyy"); Assert.IsFalse(result); }