public void OpEquality() { var leftEither = EitherExtensions.AsRight <int, string>("12"); var rightEither = EitherExtensions.AsRight <int, string>("12"); (leftEither == rightEither).Should().BeTrue(); }
public void OpEqualityReferenceType() { var list = new List <string> { "1", "2" }; var leftEither = EitherExtensions.AsRight <int, List <string> >(list); var rightEither = EitherExtensions.AsRight <int, List <string> >(list); (leftEither == rightEither).Should().BeTrue(); }
public void GetHashCodeReturnsHashCodeOfRightValue() { var rightEither = EitherExtensions.AsRight <int, string>("12"); rightEither.GetHashCode().Should().Be("12".GetHashCode()); }