mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-03 07:13:02 +00:00
Removed redundant times(1) params for verify()
This commit is contained in:
1 parent
fb4c0f77e5
commit
a2a08a3a3e
1 file changed
+3
-3
@@ -44,15 +44,15 @@ public abstract class WeaponTest {
|
||||
assertNotNull(weapon.getEnchantment());
|
||||
|
||||
weapon.swing();
|
||||
verify(enchantment, times(1)).apply();
|
||||
verify(enchantment).apply();
|
||||
verifyNoMoreInteractions(enchantment);
|
||||
|
||||
weapon.wield();
|
||||
verify(enchantment, times(1)).onActivate();
|
||||
verify(enchantment).onActivate();
|
||||
verifyNoMoreInteractions(enchantment);
|
||||
|
||||
weapon.unwield();
|
||||
verify(enchantment, times(1)).onDeactivate();
|
||||
verify(enchantment).onDeactivate();
|
||||
verifyNoMoreInteractions(enchantment);
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user