on ‎2018 Mar 09 11:09 PM
Hi Guys, I am creating a test for one of our method and the method has product.getName() i am setting up the values in my test with locale
final Locale locale = new Locale("en"); productModel.setName("DE-base", locale);
but while running the test i am getting the below error.
I am getting an error like "There is no LocaleProvider for (Detached) servicelayer model"
Any help will be appreciated here.
Request clarification before answering.
Thanks for the reply raghavendra, i have fixed it by just mocking and making a doReturn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh,
You dont need to create a English Locale object, try to use Locale.ENGLISH for setting english name for the product, which should work. Please take a look at OOTB test classes (Eg: LocalizationAwareValidationServiceTest) for more details.
Regards,
Raghavendra.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.