pegomock:Pegomock是用于Go编程语言的功能强大但简单的模拟框架

时间:2021-04-13 21:03:58
【文件属性】:
文件名称:pegomock:Pegomock是用于Go编程语言的功能强大但简单的模拟框架
文件大小:88KB
文件格式:ZIP
更新时间:2021-04-13 21:03:58
mock golang mocking-framework Go PegoMock是用于模拟框架。 它与Go的内置testing包很好地集成在一起,但是也可以在其他环境中使用。 它基于 ,但使用与紧密相关的DSL。 获得Pegomock 刚go get它: go get github.com/petergtz/pegomock/... 这将下载软件包并在$GOPATH/bin安装一个可执行的pegomock 。 另请参阅一节每个项目对工具版本的控制。 入门 将Pegomock与Golang的XUnit风格的测试结合使用 首选方式是: import ( "github.com/petergtz/pegomock" "testing" ) func TestUsingMocks ( t * testing. T ) { mock := NewMockPhoneBook ( pegomock . WithT ( t )) // use your
【文件预览】:
pegomock-master
----.travis.yml(266B)
----.goreleaser.yml(455B)
----vendor()
--------github.com()
----ginkgo_compatible()
--------option.go(91B)
--------matchers.go(6KB)
--------whenever.go(87B)
--------in_order_context.go(99B)
----internal()
--------generate_matchers()
--------verify()
----model()
--------model.go(6KB)
----.github()
--------pull_request_template.md(112B)
----testing_t_support.go(2KB)
----_config.yml(26B)
----invocation_count_matchers.go(1KB)
----matcher_factories.go(14KB)
----generate_test_mocks()
--------gomock_reflect()
--------xtools_go_loader()
--------gomock_source()
----LICENSE(11KB)
----pegomock()
--------filehandling()
--------testutil()
--------remove()
--------main_test.go(17KB)
--------package_name_test.go(2KB)
--------main.go(7KB)
--------util()
--------watch()
--------package_name.go(187B)
----modelgen()
--------modelgen_test.go(3KB)
--------loader()
--------test_data()
--------gomock()
----matchers()
--------map_of_int_to_int.go(784B)
--------map_of_string_to_http_request.go(978B)
--------ptr_to_http_request.go(836B)
--------io_readcloser.go(812B)
--------map_of_string_to_empty_unnamed_struct.go(944B)
--------send_chan_of_error.go(803B)
--------recv_chan_of_string.go(818B)
--------time_time.go(756B)
--------map_of_string_to_interface.go(941B)
--------map_of_http_file_to_http_file.go(974B)
--------slice_of_string.go(751B)
--------http_request.go(805B)
----panic_with_message_to_matcher_test.go(2KB)
----panic_with_message_matcher_test.go(2KB)
----.gitignore(90B)
----test_interface()
--------display.go(2KB)
----dsl.go(17KB)
----matcher.go(3KB)
----README.md(18KB)
----scripts()
--------ginkgo-watch-recursive(142B)
--------ginkgo-watch-gomock-source(111B)
--------run_tests.sh(762B)
--------ginkgo-watch-gomock-reflect(112B)
----types.go(478B)
----dsl_test.go(38KB)
----mockgen()
--------mockgen.go(20KB)
--------mockgen_suite_test.go(194B)
--------util()
--------mockgen_test.go(2KB)

网友评论