Commit e2b317d8 authored by Raimbek Egemberdiev's avatar Raimbek Egemberdiev

merged dev

parent 663bb459
...@@ -21,16 +21,16 @@ import java.util.Set; ...@@ -21,16 +21,16 @@ import java.util.Set;
* @author raimbek * @author raimbek
* @since 09.11.2016 * @since 09.11.2016
*/ */
public class AsFormProvider { public class AsFormService {
private RestHttpQuery restHttpQuery; private RestHttpQuery restHttpQuery;
private AsFormProvider(QueryContext context) { private AsFormService(QueryContext context) {
this.restHttpQuery = new RestHttpQuery(context); this.restHttpQuery = new RestHttpQuery(context);
} }
public static AsFormProvider newInstance(QueryContext context) { public static AsFormService newInstance(QueryContext context) {
return new AsFormProvider(context); return new AsFormService(context);
} }
public List<AdvancedSearchResult> advancedSearch(AdvancedSearchParams searchParams) throws IOException { public List<AdvancedSearchResult> advancedSearch(AdvancedSearchParams searchParams) throws IOException {
......
...@@ -17,7 +17,7 @@ import java.util.List; ...@@ -17,7 +17,7 @@ import java.util.List;
* @author raimbek * @author raimbek
* @since 09.11.2016 * @since 09.11.2016
*/ */
public class AsFormProviderTest { public class AsFormServiceTest {
String expectedTextInputValue = "value_1"; String expectedTextInputValue = "value_1";
String expectedNumericInputValue = "value_2"; String expectedNumericInputValue = "value_2";
...@@ -33,7 +33,7 @@ public class AsFormProviderTest { ...@@ -33,7 +33,7 @@ public class AsFormProviderTest {
String expectedTableInputValueB2 = "table_input_b2"; String expectedTableInputValueB2 = "table_input_b2";
TestForm testForm; TestForm testForm;
AsFormProvider asFormProvider; AsFormService asFormService;
@BeforeClass @BeforeClass
public void createAsfWrapper() throws IOException { public void createAsfWrapper() throws IOException {
...@@ -63,8 +63,8 @@ public class AsFormProviderTest { ...@@ -63,8 +63,8 @@ public class AsFormProviderTest {
@Test @Test
public void testQuery() throws IOException { public void testQuery() throws IOException {
asFormProvider = AsFormProvider.newInstance(new QueryContext("http://192.168.0.143:8080/Synergy", "NppAdmin", "123456")); asFormService = AsFormService.newInstance(new QueryContext("http://192.168.0.143:8080/Synergy", "NppAdmin", "123456"));
TestForm fetch = asFormProvider.fetch(TestForm.class, "2ae95419-af0e-4017-bad9-ff527591ef02"); TestForm fetch = asFormService.fetch(TestForm.class, "2ae95419-af0e-4017-bad9-ff527591ef02");
System.out.println(); System.out.println();
} }
...@@ -109,7 +109,7 @@ public class AsFormProviderTest { ...@@ -109,7 +109,7 @@ public class AsFormProviderTest {
@Test @Test
public void toAsfData() { public void toAsfData() {
AsFormWrapper asFormWrapper = asFormProvider.toAsfData(testForm); AsFormWrapper asFormWrapper = asFormService.toAsfData(testForm);
AsFormData textInput = asFormWrapper.getData("text_input"); AsFormData textInput = asFormWrapper.getData("text_input");
Assert.assertEquals(textInput.getType(), ComponentTypes.TEXT_BOX); Assert.assertEquals(textInput.getType(), ComponentTypes.TEXT_BOX);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment