Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mockDataService throws NoSuchMethodError #38

Open
zyro23 opened this issue Jul 31, 2018 · 0 comments
Open

mockDataService throws NoSuchMethodError #38

zyro23 opened this issue Jul 31, 2018 · 0 comments
Assignees

Comments

@zyro23
Copy link

zyro23 commented Jul 31, 2018

trying to write a ServiceUnitTest and mock a data service that the service under test is using, i get a NoSuchMethodError:

java.lang.NoSuchMethodError: org.grails.datastore.mapping.core.AbstractDatastore.getService(Ljava/lang/Class;)Lorg/grails/datastore/mapping/services/Service;
	at grails.testing.gorm.DataTest$Trait$Helper.mockDataService(DataTest.groovy:96)
	at myapp.DummyServiceSpec.setupSpec(DummyServiceSpec.groovy:11)

but looking at the code (i.e. the AbstractDatastore.getService method signature), i cannot figure out whats wrong.

sample app will be referenced in a minute.

zyro23 added a commit to zyro23/grails-testing-support-38 that referenced this issue Jul 31, 2018
@puneetbehl puneetbehl self-assigned this Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants