public void ForegroundColorSpans_with_the_same_name_are_equal() { var one = new ForegroundColorSpan("green", Ansi.Color.Foreground.Green); var two = new ForegroundColorSpan("green", Ansi.Color.Foreground.Green); one.Equals(two).Should().BeTrue(); one.Invoking(code => code.Equals(null)).Should().NotThrow <NullReferenceException>(); }