You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Andrea Spacca ec086b4eb3 Bump google.golang.org/api 5 vuotta sitten
..
concurrent Bump google.golang.org/api 5 vuotta sitten
imp1 Bump google.golang.org/api 5 vuotta sitten
imp2 Bump google.golang.org/api 5 vuotta sitten
imp3 Bump google.golang.org/api 5 vuotta sitten
imp4 Bump google.golang.org/api 5 vuotta sitten
mock_user Bump google.golang.org/api 5 vuotta sitten
README.md Bump google.golang.org/api 5 vuotta sitten
user.go Bump google.golang.org/api 5 vuotta sitten
user_test.go Bump google.golang.org/api 5 vuotta sitten

README.md

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 ../gomock/matchers.go for the go:generate command used to generate it.

To run the test,

go test github.com/golang/mock/sample