Skip to content

Commit 133ba8b

Browse files
authored
Merge pull request #1 from vicmar57/add_UML_diagrams
Added uml diagram for adapter pattern
2 parents b35c8d0 + e2e9df6 commit 133ba8b

File tree

35 files changed

+42
-44
lines changed

35 files changed

+42
-44
lines changed
40.6 KB
Loading

AdapterPattern/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Adapter Pattern
2+
3+
UML diagram:
4+
![Alt text](AdapterPatternUML.jpg?raw=true "Pattern's UML diagram")

AdapterPattern/bin/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/AdapterPattern/
17 Bytes
Binary file not shown.
8 Bytes
Binary file not shown.
-710 Bytes
Binary file not shown.
-139 Bytes
Binary file not shown.
-153 Bytes
Binary file not shown.
25 Bytes
Binary file not shown.

AdapterPattern/src/AdapterPattern/AdapterPatternTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ class AdapterPatternTest {
88

99
@Test
1010
public void whenConvertingMPHToKMPH_thenSuccessfullyConverted() {
11-
ICarSpecs bugattiVeyron = new BugattiVeyron();
12-
ICarSpecsAdapter bugattiVeyronAdapter = new CarSpecImpl(bugattiVeyron);
11+
IImperialCarSpecs bugattiVeyron = new BugattiVeyron();
12+
IMetricCarSpecs bugattiVeyronAdapter = new CarSpecAdapter(bugattiVeyron);
1313

1414
assertEquals(bugattiVeyronAdapter.getSpeed(), 408.4665854);
1515
}

0 commit comments

Comments
 (0)