public void ReturnsStringAndHash() { var glob = new Glob("abc", FileSystem); Assert.Equal("abc", glob.ToString()); Assert.Equal("abc".GetHashCode(), glob.GetHashCode()); }
public void Combine_should_conserve_on_reference_equality() { Glob a = Glob.Parse("*.java"); Glob c = Glob.Combine(a, a, a); Assert.Same(c, a); Assert.Equal("*.java", c.ToString()); }
public void Combine_should_combine_into_semicolon_syntax() { Glob a = Glob.Parse("*.cs"); Glob b = Glob.Parse("*.vb"); Glob c = Glob.Combine(a, b); Assert.Equal("*.cs;*.vb", c.ToString()); }
public void Combine_should_combine_into_semicolon_syntax_2() { Glob a = Glob.Parse("*.cs"); Glob b = Glob.Parse("*.vb"); Glob c = Glob.Parse("*.java"); Glob d = Glob.Combine(a, b, c); Assert.Equal("*.cs;*.vb;*.java", d.ToString()); }
protected bool Equals(FilePattern other) { return(Glob.ToString() == other.Glob.ToString() && IsExclude == other.IsExclude && TextSpans.SequenceEqual(other.TextSpans)); }