Changeset 24 for events/src/test
- Timestamp:
- 10/06/20 13:12:20 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
events/src/test/java/actions/VotesTest.java
r22 r24 94 94 95 95 @Test 96 public void isExtendingTestLessPower() { 97 Vote powervoteA1 = new Vote(partyA, bid1, 3, 9); 98 Votes powerVotes = new Votes(partyA, Arrays.asList(powervoteA1)); 99 assertFalse(powerVotes.isExtending(votes1)); 100 assertTrue(votes1.isExtending(powerVotes)); 96 public void isExtendingIdenticalVotes() { 97 assertTrue(votes1.isExtending(votes1)); 98 } 99 100 @Test 101 public void isReallyExtendingVotesMin() { 102 Vote powervoteA1 = new Vote(partyA, bid1, 1, 9); 103 Votes powerVotes = new Votes(partyA, 104 Arrays.asList(powervoteA1, voteA2)); 105 assertTrue(powerVotes.isExtending(votes1)); 106 } 107 108 @Test 109 public void isReallyExtendingVotesMax() { 110 Vote powervoteA1 = new Vote(partyA, bid1, 2, 10); 111 Votes powerVotes = new Votes(partyA, 112 Arrays.asList(powervoteA1, voteA2)); 113 assertTrue(powerVotes.isExtending(votes1)); 114 } 115 116 @Test 117 public void IsNarrowingOneVoteRemoved() { 118 Votes narrowVotes = new Votes(partyA, Arrays.asList(voteA2)); 119 assertFalse(narrowVotes.isExtending(votes1)); 120 } 121 122 @Test 123 public void isNarrowingTestMoreMinPower() { 124 Vote narrowVoteA1 = new Vote(partyA, bid1, 3, 9); 125 Votes narrowVotes = new Votes(partyA, 126 Arrays.asList(narrowVoteA1, voteA2)); 127 assertFalse(narrowVotes.isExtending(votes1)); 128 assertTrue(votes1.isExtending(narrowVotes)); 129 } 130 131 @Test 132 public void isNarrowingLessMaxPower() { 133 Vote powervoteA1 = new Vote(partyA, bid1, 2, 8); 134 Votes narrowVotes = new Votes(partyA, 135 Arrays.asList(powervoteA1, voteA2)); 136 assertFalse(narrowVotes.isExtending(votes1)); 137 assertTrue(votes1.isExtending(narrowVotes)); 101 138 } 102 139
Note:
See TracChangeset
for help on using the changeset viewer.