Merge branch 'master' into master

This commit is contained in:
Sanket Panhale
2018-01-28 14:44:19 -05:00
committed by GitHub
686 changed files with 6683 additions and 7868 deletions

View File

@ -3,7 +3,6 @@ layout: pattern
title: Bridge
folder: bridge
permalink: /patterns/bridge/
pumlid: BSR14SCm20J0Lf82BFxf1akCJ4R26ZZYzkE7zxLljJgoIVfu7S2A3v7pLRhYo3r3l9u6CPHwJjAH5uETllpZhKbejsqn86v1a-CExQwj2mdgqv8-oyev_W00
categories: Structural
tags:
- Java

View File

@ -29,13 +29,18 @@
<parent>
<groupId>com.iluwatar</groupId>
<artifactId>java-design-patterns</artifactId>
<version>1.17.0-SNAPSHOT</version>
<version>1.19.0-SNAPSHOT</version>
</parent>
<artifactId>bridge</artifactId>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>

View File

@ -22,7 +22,7 @@
*/
package com.iluwatar.bridge;
import org.junit.Test;
import org.junit.jupiter.api.Test;
/**
*

View File

@ -22,11 +22,10 @@
*/
package com.iluwatar.bridge;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
/**
* Tests for hammer

View File

@ -22,11 +22,10 @@
*/
package com.iluwatar.bridge;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
/**
* Tests for sword

View File

@ -22,10 +22,11 @@
*/
package com.iluwatar.bridge;
import static org.junit.Assert.assertNotNull;
import org.junit.jupiter.api.Disabled;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.internal.verification.VerificationModeFactory.times;
/**
* Base class for weapon tests
@ -44,15 +45,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);
}