This commit is contained in:
Морозов Андрей 2022-03-18 12:03:50 +00:00
parent 605e39e09e
commit bbc83bd593
1 changed files with 4 additions and 4 deletions

View File

@ -1,8 +1,8 @@
const adapteeMessage = 'Adaptee#method was called';
const adapteeMessage = 'Вызов адаптирующегося метода';
class Adaptee {
String method() {
print('Adaptee#method is being called');
print('Вызов адаптирующегося метода');
return adapteeMessage;
}
@ -15,7 +15,7 @@ abstract class Target {
class Adapter implements Target {
String call() {
var adaptee = Adaptee();
print('Adapter#call is being called');
print('Вызов адаптирующегося метода');
return adaptee.method();
}
@ -25,5 +25,5 @@ void main() {
var adapter = Adapter();
var result = adapter.call();
assert(result == adapteeMessage);
print(result == adapteeMessage);
}