public void Implements_equality_contract() { EqualityContract.Assert( equivalent: new[] { new BindingResult <string>("a"), new BindingResult <string>("a") }, distinct: new[] { new BindingResult <string>("a"), new BindingResult <string>("b"), new BindingResult <string>(null), default(BindingResult <string>) }); EqualityContract.Assert( equivalent: new[] { default(BindingResult <int>), default(BindingResult <int>) }, distinct: new[] { default(BindingResult <int>), new BindingResult <int>(0) }); }
public void Implements_equality_contract() { EqualityContract.Assert( equivalent: new[] { new BindingResultChange <int>(BindingResult.Some(0), BindingResult.Some(1)), new BindingResultChange <int>(BindingResult.Some(0), BindingResult.Some(1)) }, distinct: new[] { new BindingResultChange <int>(BindingResult.Some(0), BindingResult.Some(1)), new BindingResultChange <int>(BindingResult.Some(1), BindingResult.Some(1)), new BindingResultChange <int>(BindingResult.Some(0), BindingResult.Some(0)), new BindingResultChange <int>(BindingResult.None <int>(), BindingResult.Some(1)), new BindingResultChange <int>(BindingResult.Some(0), BindingResult.None <int>()) }); }