Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        public void equality_with_equals_false_when_same_object()
        {
            var env = new EnvironmentInfoEntry("name", "value");

            object other = env;

            env.Equals(other).Should().Be(true);
        }
Example #4
0
 public bool Equals(EnvironmentInfoEntry other)
 {
     return(string.Equals(Name, other.Name) && string.Equals(Value, other.Value));
 }