mocking
Here are 605 public repositories matching this topic...
Hi,
It seems like the HTTP Assert package does not allow me to specify a body to pass in a POST request for example. Looking at the HTTPBody() function, the body argument is set to nil:
req, err := http.NewRequest(method, url+"?"+values.Encode(), nil)
Is this by design, or am I looking at a missing feature?
Cheers,
As a new end user, I cannot find a single user guide or decent documentation. The javadoc reads like it's written as a quick review for someone who already knows the ins/outs of Mockito and just need some sample code. I don't even know what or how Mockito works and the first couple of lines are talking about "mockito inline".
Most open source projects have really great user guides and document
When learning how to use mocker I came across this paragraph on this page:
When creating a test double object, we can pass in an identifier as a name for our test double. If we pass it no identifier, the test double name will be unknown. Furthermore, the identifier must not be a class name. It i
New Issue Checklist
- I have tried with the latest version of OHHTTPStubs
- I have read the README
- I have read the Using the right Swift Version of
OHHTTPStubsfor your project section - I have
It was non-obvious to me that the parameters supplied to the model via the withTransformerParameter would be under a "parameters" key rather than the raw key supplied in the DSL call. I think it would be helpful to have an explicit example in addition to the several request based examples.
I'm happy to raise a PR to the docs if this seems like a good idea.
The documentation for Maven setup for powermockito with Mockito1 shows the dependency as below-
<properties>
<powermock.version>2.0.2</powermock.version>
</properties>
<dependencies>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>${powermock.
It would be nice to start building Pester on PowerShell 7 as well to see if it is compatible and keep it that way. To achieve that we need to research on which build servers v7 is already available. Right now we are building on TravisCI (Linux and MacOS), on AppVeyor (PowerShell 4+) and AzureDevOps (PowerShell 2&3).
Not sure if the build task needs to run on all three platforms, but it would be
If I reply with a set-cookie I expect document.cookie to be updated within a browser or fake-DOM environment, like Jest/jsdom.
How can I mock a url that is used to download a file?
Is it possible to set a file into the body of register_uri?
https://github.com/agriffis/vcrpy-unittest adds a VCRTestCase (and a VCRMixin) class. They consists only of 23 lines of code. Please include those two functions in your project to avoid needing to install another package. Those tiny package have a bigger overhead and packaging them for Debian would be rejected due to this reason.
Provide a mock show page that will allow users to view a mock configuration with a legit layout.
- Use code formatting for body content & script
- Description links should be rendered as link, not as text
The hard 100 request (POST/PUT/GET/etc) limit should be more prominently called out in docs.
Line 172 from https://github.com/Mashape/mockbin/blob/master/docs/api/bins.md reads:
All requests to Bin will be logged for later inspection (max of 100 requests)On a personal project I must have missed that line and burned myself because I thought there was an internal application/ne
When there is no match, the response body will contain useful debugging information such as what matcher came the closest and which specific criteria it did not match on.
The problem is that we can also get the false positive scenario, where we are expecting a particular match to take place but a different one does instead.
We propose an explain functionality along the lines of `hoverctl
Documentation revamp
Several pages of the docs are in need of an update. Includes the following:
- Adding the system daemon docs from the README to the site
- Updating or removing the examples page
- Updating the client libraries, including potentially adding a github organization
- Updating the support iframe
- Updating the glossary to the mental model map from manning
- Validating the contracts page is up to
I think it would be helpful if the partial subs page mentioned the need to add:
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>YOUR TEST ASSEMBLY</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.I
I have a library that I generate all of my mocks into that is imported in my unit tests. When mocking a protocol, the generated mock object doesn't have an initializer declared. This means is uses the default initializer, which would be fine, except the default init() method is internal. I can get around this by importing my mock library @testable, but I'd suggest that protocol mocks for publi
User story.
As a developer, I can change a referenced example file, so that I can see the changes after a request to prism.
Is your feature request related to a problem?
Prism only watches the spec file for changes and even if it changes, it doesn't reload referenced examples. This is useful because spec files can get extremely big so $ref usage is a must to keep it manageable.
Verbose logging
-
Updated
Jun 6, 2020 - Swift
Description
Per the documentation and the tests the td.matchers.contains() can take multiple arguments. However, the [type definitions](https
-
Updated
May 19, 2020 - Go
Perhaps using the Try .NET Global Tool. See what Scott Hanselman has to say about it.
-
Updated
Dec 3, 2018 - C#
This probably doesn't affect many people, and it isn't super important, but let's say you create a package with a name that is the same as a package it uses. Eg I might make github.com/xxx/myapp/http and inside of it use the net/http package.
package http
//go:generate moq -pkg http_test -out thing_moq_test.go . Thing
type Thing interface {
Blah(w http.ResponseWriter, r *httRight now, [README.md][readme] includes copy-pasted code from sample code in [src/example/][src/example] tree, but they're not kept in-sync automatically.
Ideally, we would have a process for automatically including code samples, e.g., via some preprocessing since it's probably not possible to do it dynamically, so that we can avoid having to see them diverge, e.g., as can be seen in issue
I am trying to test this functionality in mongoengine:
http://docs.mongoengine.org/guide/text-indexes.html#ordering-by-text-score
When I run this function during a test I get:
File "/home/xxx/.virtualenvs/xxx/local/lib/python3.6/site-packages/mongomock/collection.py", line 934, in _get_dataset
reverse=sort_direction < 0))
TypeError: '<' not supported between instances of 'dict' a
-
Updated
Nov 18, 2019 - C#
Current docs shows this as an example:
const fetchRouter = new Router({
strategies: ['fetch']
});
Which is wrong, since that argument should be the second one, not the first one.
A proper example would be:
const fetchRouter = new Router(
{} , // interceptor options
{
strategies: ['fetch']
}
);
Improve this page
Add a description, image, and links to the mocking topic page so that developers can more easily learn about it.
Add this topic to your repo
To associate your repository with the mocking topic, visit your repo's landing page and select "manage topics."
Wanted to find a project to play around with VuePress and figured i'd help improve the documentation for this library since i use it on a regular basis (thanks @Marak)
Anyways, I'm almost done with the full documentation and thought i would share it with the community.
You can access the documentation here: https://fakerjsdocs.netlify.com/
Repo is here: https://github.com/JeffBeltran/fa