File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<!--
3- * SPDX-FileCopyrightText: Copyright (c) 2018-2026 Zerocracy
4- * SPDX-License-Identifier: MIT
3+ * SPDX-FileCopyrightText: Copyright (c) 2018-2026 Zerocracy
4+ * SPDX-License-Identifier: MIT
55-->
66<project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
77 <modelVersion >4.0.0</modelVersion >
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ public int compareTo(final Copy other) {
116116 @ Override
117117 public boolean equals (final Object obj ) {
118118 return obj instanceof Copy
119- && this .compareTo (( Copy ) obj ) == 0 ;
119+ && this .wlt . equals ((( Copy ) obj ). wlt ) ;
120120 }
121121
122122 @ Override
Original file line number Diff line number Diff line change @@ -41,6 +41,23 @@ void groupsRemotesScoresIntoSingleCopy() {
4141 );
4242 }
4343
44+ @ Test
45+ void distinguishesCopiesWithDifferentWallets () {
46+ final Remote remote = new Remote .Fake (
47+ new RtScore (new IterableOf <>(new TextOf ("a" )))
48+ );
49+ MatcherAssert .assertThat (
50+ "wallet identity defines copy equality" ,
51+ new Copies .Copy (new Wallet .Fake (1L ), remote ).equals (
52+ new Copies .Copy (
53+ new Wallet .Fake (2L ),
54+ remote
55+ )
56+ ),
57+ new IsEqual <>(false )
58+ );
59+ }
60+
4461 private static Iterable <Copies .Copy > copies () {
4562 return new Copies (
4663 1L ,
You can’t perform that action at this time.
0 commit comments