public void equality_with_not_equals_operator(string name, string value, bool expected) { var env = new EnvironmentInfoEntry("name", "value"); var other = new EnvironmentInfoEntry(name, value); (env != other).Should().Be(!expected); }
public void equality_with_equals(string name, string value, bool expected) { var env = new EnvironmentInfoEntry("name", "value"); var other = new EnvironmentInfoEntry(name, value); env.Equals(other).Should().Be(expected); }
public void equality_with_equals_false_when_same_object() { var env = new EnvironmentInfoEntry("name", "value"); object other = env; env.Equals(other).Should().Be(true); }
public bool Equals(EnvironmentInfoEntry other) { return(string.Equals(Name, other.Name) && string.Equals(Value, other.Value)); }