Questions tagged [verify]
676 questions
10
votes
11 answers
Verify database changes (version-control)
I have read lots of posts about the importance of database version control. However, I could not find a simple solution how to check if database is in state that it should be.
For example, I have a databases with a table called "Version" (version…

Sazug
- 382
- 4
- 13
9
votes
1 answer
What does Firebase server side verifyIdToken() do under the hood?
I'm considering to use Firebase to perform identity verification. I am new to JWT, so my apologies if this is an obvious question, but I don't understand how the verification is actually done. It seems that…

guik
- 419
- 6
- 11
9
votes
2 answers
mockito verify method call inside method
for a unit tests i am trying to verify if there is
a way to verify a method call inside a method with mockito verify?
An example would be:
public delete(param) {
VideoService.deleteVideo(param); << i want to verify the call of this method
…

Tvt
- 223
- 1
- 3
- 16
9
votes
1 answer
Moq Verify without It - what kind of compare?
When using Moq with Verify, to assert that a certain method has been called with specified parameters, different kind of syntax is possible; one is the "It" syntax, like this
mock.Verify(c => c.SomeMethod(It.Is(s => s ==…

user3774315
- 153
- 1
- 7
9
votes
2 answers
Verifying generic method called using Moq
I'm having trouble verifying that mock of IInterface.SomeMethod(T arg) was called using Moq.Mock.Verify.
I'm can verify that method was called on a "Standard" interface either using It.IsAny() or…

sennett
- 8,014
- 9
- 46
- 69
8
votes
3 answers
Not hacking CurlException: 60 (cURL SSL Certificate Verification)
The error that alot of people get with Facebook authentication is:
CurlException: 60: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
And the only…

John
- 460
- 1
- 5
- 18
8
votes
3 answers
Using mockito.verify to ignore one of the parameters
I want to skip checking one of the parameters in a verify call. So for:
def allowMockitoVerify=Mockito.verify(msg,atLeastOnce()).handle(1st param,,3rd param)
I want to skip checking for the second parameter. How can I do that?

user2854849
- 81
- 1
- 1
- 3
8
votes
3 answers
Verify domain ownership
When setting up Google Adsense or Gmail as a site owner, you are required to modify a CNAME record for verification. Microsoft does the same thing.
I am building a website where I would like an owner of a group to verify ownership of a domain in…

Matt Norris
- 8,596
- 14
- 59
- 90
7
votes
1 answer
Verify method has been called with IEnumerable containing 'x' elements with Moq
I have a repository with an Add method that takes an IEnumerable as parameter:
public void Add(T item) where T : class, new(){}
In a unittest I want to verify that this method is called with an IEnumerable that contains exactly the same amount…

Andrew
- 5,395
- 1
- 27
- 47
7
votes
4 answers
JTable Input Verifier
I am trying to create a simple Input Verifier for a JTable.
I ended up with overriding the method: editingStopped().
The problem is that the event does not include informations about the cell that has been updated.
This is my "pseudo code":
If…

Ioannis K.
- 552
- 1
- 6
- 20
7
votes
4 answers
Mockito verify the last call on a mocked object
I have a bit of logic that needs to be tested such as:
{
...
A.add("1");
...
A.add("what ever");
...
A.add("2");
A.delete("5");
...
}
I have already mocked A in my test and I can test the add method is called once on…

hongchangfirst
- 245
- 3
- 17
7
votes
1 answer
Mockito complains about wrong arguments
We try to verify the behaviour of an action with Mockito. The test code looks like this
final Type1 mock = mock(Type1.class);
new SomeAction(mock).actionPerformed(null);
verify(mock).someMethod();
The method actionPerformed contains just…

Jens Schauder
- 77,657
- 34
- 181
- 348
7
votes
0 answers
RSA Padding check failed in openssl verify
I am writing a test fixture in python2 and pyOpensSSL that is essentially an SSL factory. This text fixture creates its own CA cert and key, and then creates certs signed by this CA.
Currently, I am unable to verify the certs using openssl verify. …

reveller
- 71
- 1
- 5
7
votes
2 answers
Verifying calls with ref parameters using Moq
How can I verify that the "CallWithRef" method was called using Moq?
public interface ITest
{
void CallWithoutRef(string value, List errors);
void CallWithRef(string value, ref List errors);
}
public class Foo
{
private…

ilitirit
- 16,016
- 18
- 72
- 111
7
votes
1 answer
Verify property is never set using Moq
Possible Duplicate:
Moq - How to verify that a property value is set via the setter
I would expect the following test to fail:
public interface IObjectWithProperty
{
int Property { get; set; }
}
[TestMethod]
public void…

g t
- 7,287
- 7
- 50
- 85