public void FieldOrderDoesNotAffectHashCode() { var list1 = DamlList.Of(new Int64(12345), new Party("party1"), new Bool(false)); var list2 = DamlList.Of(new Party("party1"), new Int64(12345), new Bool(false)); Assert.True(list1.GetHashCode() == list2.GetHashCode()); }
private void ConvertThroughProto(DamlList source) { Com.Daml.Ledger.Api.V1.Value protoValue = source.ToProto(); var maybe = Value.FromProto(protoValue).AsList(); maybe.Should().BeOfType <Some <DamlList> >(); Assert.True(source == (Some <DamlList>)maybe); }
private void ConvertThroughProto(DamlList source) { Com.DigitalAsset.Ledger.Api.V1.Value protoValue = source.ToProto(); var maybe = Value.FromProto(protoValue).AsList(); Assert.AreEqual(typeof(Some <DamlList>), maybe.GetType()); Assert.IsTrue(source == (Some <DamlList>)maybe); }
public void FieldOrderDoesNotAffectEquality() { var list = DamlList.Of(ValuesFactory.Values1.Reverse()); Assert.True(_list1.Equals(list)); }
public void CanConvertBetweenProto() { ConvertThroughProto(_list1); ConvertThroughProto(DamlList.Of(new Value[] {})); }