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.

Replace HTML codes with equivalent characters in Java

Currently I'm working on converting HTML codes with equivalent characters in java. I need to convert the below code to …

java pattern-matching matcher
Jasmine toEqual for complex objects (mixed with functions)

Currently, I have a function that sometimes return an object with some functions inside. When using expect(...).toEqual({...}) it doesn't …

jasmine matcher
Convert Javascript regular expression to Java syntax

I am aware that regEx are common across languages...But I am having trouble in writing the Java syntax. I …

java javascript regex matcher
RSpec: Expect to change multiple

I want to check for many changes in a model when submitting a form in a feature spec. For example, …

ruby-on-rails rspec matcher
org.mockito.exceptions.misusing.InvalidUseOfMatchersException:

My method in the service and test class : public void updateSubModuleOrder(Long[] data, Long moduleSysId, Long userId) { try { for (int …

java junit mockito matcher
Mockito not allowing Matchers.any() with Integer.class

I am trying to unit test this method: /** * finds all widget descriptions containing specified text * @param searchText * @return */ @Transactional public …

java junit mockito junit4 matcher
How to write a matcher that is not equal to something

I am trying to create a mock for a call. Say I have this method I am trying to stub …

java junit mockito matcher
Use variables in pattern matcher

I have the following: if (mobile.matches("[0-9]{6,20}")) { ... } But would like to replace the {6,20} with variable values due to them …

java regex matcher
java regex pattern unclosed character class

I need some help. Im getting: Caused by: java.util.regex.PatternSyntaxException: Unclosed character class near index 24 ^[a-zA-Z└- 0-9£µ /.…

java regex matcher
How to use Android REGEX with Pattern and Matcher Classes?

I have the following code: String example = "<!--§FILES_SECTION§\n" + "Example line one\n" + "Example line two\n" + "§…

java android regex matcher