- Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathTestAdapter.cs
More file actions
Latest commit
29 lines (26 loc) · 703 Bytes
/
Copy pathTestAdapter.cs
File metadata and controls
29 lines (26 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Threading.Tasks;
namespaceStructuralPatterns.Adapter
{
publicclassTestAdapter
{
publicstaticvoidRun()
{
// Class Adapter
TurkeyClassAdapterclassAdapter=newTurkeyClassAdapter();
testDuck(classAdapter);
// Object Adapter
WildTurkeyturkey=newWildTurkey();
TurkeyObjectAdapterobjectAdapter=newTurkeyObjectAdapter(turkey);
testDuck(objectAdapter);
}
staticvoidtestDuck(IDuckduck)
{
duck.Quack();
duck.Fly();
}
}
}