mirror of
https://github.com/Estom/notes.git
synced 2026-02-09 13:27:09 +08:00
go知识重新整理
This commit is contained in:
20
Go/DesignPattern/proxy/proxy_test.go
Normal file
20
Go/DesignPattern/proxy/proxy_test.go
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @Author:zhoutao
|
||||
* @Date:2020/12/11 下午2:13
|
||||
* @Desc:
|
||||
*/
|
||||
|
||||
package proxy
|
||||
|
||||
import "testing"
|
||||
|
||||
var expect = "pre to do :going to do something: after to do"
|
||||
|
||||
func TestProxy(t *testing.T) {
|
||||
var sub Subject
|
||||
sub = &Proxy{}
|
||||
res := sub.Do()
|
||||
if res != expect {
|
||||
t.Fatalf("expect %s ,return %s", expect, res)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user