Как использовать несколько языков в комбинированном jFairy-Locale - PullRequest
1 голос
/ 13 марта 2019

Во время тестирования автоматизации я пытаюсь выбрать «Албанский» из выпадающего списка языков и пытаюсь ввести название компании, созданное с помощью jFairy.Ниже приведен фрагмент кода, который я использую (который находится на Java).

Как показано на рисунке ниже.

Please check the attached.

Fairy plFairy = Fairy.create(Locale.forLanguageTag("sq_AL"));    
Company alcompany = plFairy.company();
System.out.println("Company Name : "+alcompany.getName());

Польский, французский, итальянский языки работают.Но для албанского, арабского и т. Д. Я получаю ошибку ниже.

java.lang.IllegalArgumentException: File jfairy_.yml was not found on classpath
    at com.devskiller.jfairy.data.MapBasedDataMaster.readResources(MapBasedDataMaster.java:98)
    at com.devskiller.jfairy.Bootstrap.fillDefaultDataMaster(Bootstrap.java:59)
    at com.devskiller.jfairy.Bootstrap.access$100(Bootstrap.java:38)
    at com.devskiller.jfairy.Bootstrap$Builder.build(Bootstrap.java:225)
    at com.devskiller.jfairy.Bootstrap.create(Bootstrap.java:93)
    at com.devskiller.jfairy.Fairy.create(Fairy.java:58)
    at com.bofa.ivv.application.driver.tandem.cucumber.step_definitions.CreatePartyTest.generateNames(CreatePartyTest.java:26)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

Добавлена ​​зависимость ниже

<dependency>
    <groupId>com.devskiller</groupId>
    <artifactId>jfairy</artifactId>
    <version>0.6.2</version>
</dependency> 
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...