summaryrefslogtreecommitdiff
path: root/vendor/github.com/golang/mock/sample/README.md
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-07-24 14:35:44 +0200
committerDimitri Sokolyuk <demon@dim13.org>2018-07-24 14:35:44 +0200
commit621e49bb465f500cc46d47e39e828cf76d6381d7 (patch)
treee9d6ed54cfae73209f2b0d9a016ef0b64adf45a6 /vendor/github.com/golang/mock/sample/README.md
parent5b9a4a158b81aa6e94a5a56d0851bea938b87bef (diff)
update vendor
Diffstat (limited to 'vendor/github.com/golang/mock/sample/README.md')
-rw-r--r--vendor/github.com/golang/mock/sample/README.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/github.com/golang/mock/sample/README.md b/vendor/github.com/golang/mock/sample/README.md
new file mode 100644
index 0000000..7180204
--- /dev/null
+++ b/vendor/github.com/golang/mock/sample/README.md
@@ -0,0 +1,16 @@
+This directory contains an example of a package containing a non-trivial
+interface that can be mocked with GoMock. The interesting files are:
+
+ * `user.go`: Source code for the sample package, containing interfaces to be
+ mocked. This file depends on the packages named imp[1-4] for various things.
+
+ * `user_test.go`: A test for the sample package, in which mocks of the
+ interfaces from `user.go` are used. This demonstrates how to create mock
+ objects, set up expectations, and so on.
+
+ * `mock_user/mock_user.go`: The generated mock code. See ../update_mocks.sh
+ for the command used to generate it.
+
+To run the test,
+
+ go test github.com/golang/mock/sample