public void should_equal_token_with_same_name() { var token1 = new GitAliasToken {Name = "test"}; var token2 = new GitAliasToken { Name = "test" }; token1.ShouldEqual(token2); }
public bool Equals(GitAliasToken other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Equals(other.Name, Name)); }
public void CreateAlias(string alias, string url) { var token = AliasFor(alias); if (token == null) { token = new GitAliasToken { Url = url, Name = alias }; _aliases.Add(token); } else { token.Url = url; } }
public bool Equals(GitAliasToken other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other.Name, Name); }