Top "Matcher" questions

Matchers are objects used among other things by testing libraries to check, if an object matches an abstract description of an expected state.

Java Pattern Matcher: create new or reset?

Assume a Regular Expression, which, via a Java Matcher object, is matched against a large number of strings: String expression = ...; // …

java regex reset matcher
Does an RSpec2 matcher for matching Hashes exist?

Note to future readers: think RSpec does not consider your Hashes equal? One might be an OrderedHash, but from the …

ruby hash rspec2 matcher
GoogleMock: how to expect precisely one call with a certain argument, and see diagnostic on failure?

Maybe a finesse question, my problem is that if I write: EXPECT_CALL(mock, handleMessage(_)).Times(0); // expectation #1 EXPECT_CALL(mock, …

c++ matcher googlemock expectations
Java RegEx Matcher.groupCount returns 0

I know this has been asked but I am unable to fix it For a book object with body (spanish): "…

java regex matcher
Regular expression to extract SQL query

Is there a regex which extracts SQL queries from a string? I'm NOT interested to validate any SQL syntax, rather …

java regex matcher
Mockito: Match any String except one

How can I write a matcher using Mockito that matches any string except a specific one? I have tried using …

java string junit mockito matcher
How to appendReplacement on a Matcher group instead of the whole pattern?

I am using a while(matcher.find()) to loop through all of the matches of a Pattern. For each instance …

java regex append matcher
Mockito Matchers: matching a Class type in parameter list

I am working with Java, Spring's RestTemplate, and Mockito, using Eclipse. I am trying to mock Spring's rest template, and …

java generics mockito matcher
Java support for "(?<name>pattern)" in patterns

I was wondering if Java had an equivalent to C#’s named pattern matching. For example, in C# I can …

java regex matcher
Java regex throwing exception for no match found when pattern found in line

I am dying trying to figure out why a regex won't match. Any help is much appreciated. I'm going line …

java regex matcher