mirror of
https://github.com/Estom/notes.git
synced 2026-02-06 03:54:22 +08:00
21 lines
336 B
Go
21 lines
336 B
Go
/**
|
|
* @Author:zhoutao
|
|
* @Date:2020/12/11 下午1:52
|
|
* @Desc:
|
|
*/
|
|
|
|
package adapter
|
|
|
|
import "testing"
|
|
|
|
var expect = "adaptee method被适配器方法"
|
|
|
|
func TestAdapter(t *testing.T) {
|
|
adaptee := NewAdaptee()
|
|
target := NewAdapter(adaptee)
|
|
res := target.Request()
|
|
if res != expect {
|
|
t.Fatalf("expect %s,return %s", expect, res)
|
|
}
|
|
}
|