Search in sources :

Example 6 with DataGridRule

use of com.emc.metalnx.core.domain.entity.DataGridRule in project metalnx-web by irods-contrib.

the class TestRuleService method testRuleWithVariableDeclarationForIRODS41X.

@Test
public void testRuleWithVariableDeclarationForIRODS41X() throws DataGridConnectionRefusedException {
    DataGridRule rule = new DataGridRule(DataGridRule.ILLUMINA_RULE, "icat.test.com", false);
    rule.setInputRuleParams("param1", "param2");
    rule.setOutputRuleParams("output_param");
    assertFalse(rule.toString().contains("*output_param=\"\";"));
}
Also used : DataGridRule(com.emc.metalnx.core.domain.entity.DataGridRule) Test(org.junit.Test)

Example 7 with DataGridRule

use of com.emc.metalnx.core.domain.entity.DataGridRule in project metalnx-web by irods-contrib.

the class TestRuleService method testRuleWithNoVariableDeclarationForIRODS420.

@Test
public void testRuleWithNoVariableDeclarationForIRODS420() throws DataGridConnectionRefusedException {
    DataGridRule rule = new DataGridRule(DataGridRule.ILLUMINA_RULE, "icat.test.com", false);
    rule.setInputRuleParams("param1", "param2");
    rule.setOutputRuleParams("output_param");
    assertFalse(rule.toString().contains("*output_param=\"\";"));
}
Also used : DataGridRule(com.emc.metalnx.core.domain.entity.DataGridRule) Test(org.junit.Test)

Example 8 with DataGridRule

use of com.emc.metalnx.core.domain.entity.DataGridRule in project metalnx-web by irods-contrib.

the class TestRuleService method testRuleWithOutputParams.

@Test
public void testRuleWithOutputParams() {
    DataGridRule rule = new DataGridRule(DataGridRule.VCF_RULE, "icat.test.com");
    rule.setInputRuleParams("param1", "param2");
    rule.setOutputRuleParams("output_param");
    assertNotNull(rule.toString());
    assertTrue(rule.toString().contains("INPUT *p0=\"param1\", *p1=\"param2\""));
    assertTrue(rule.toString().contains("OUTPUT *output_param"));
}
Also used : DataGridRule(com.emc.metalnx.core.domain.entity.DataGridRule) Test(org.junit.Test)

Example 9 with DataGridRule

use of com.emc.metalnx.core.domain.entity.DataGridRule in project metalnx-web by irods-contrib.

the class TestRuleService method testIRODS42Rule.

@Test
public void testIRODS42Rule() throws DataGridConnectionRefusedException {
    when(irodsServices.isAtLeastIrods420()).thenReturn(true);
    DataGridRule rule = new DataGridRule(DataGridRule.VCF_RULE, "icat.test.com", true);
    assertTrue(rule.declareRuleOutputParams());
}
Also used : DataGridRule(com.emc.metalnx.core.domain.entity.DataGridRule) Test(org.junit.Test)

Example 10 with DataGridRule

use of com.emc.metalnx.core.domain.entity.DataGridRule in project metalnx-web by irods-contrib.

the class TestRuleService method testRuleWithInputParams.

@Test
public void testRuleWithInputParams() {
    DataGridRule rule = new DataGridRule(DataGridRule.VCF_RULE, "icat.test.com");
    rule.setInputRuleParams("param1", "param2");
    assertNotNull(rule.toString());
    assertTrue(rule.toString().contains("INPUT *p0=\"param1\", *p1=\"param2\""));
}
Also used : DataGridRule(com.emc.metalnx.core.domain.entity.DataGridRule) Test(org.junit.Test)

Aggregations

DataGridRule (com.emc.metalnx.core.domain.entity.DataGridRule)16 Test (org.junit.Test)5 DataGridResource (com.emc.metalnx.core.domain.entity.DataGridResource)2 DataGridCollectionAndDataObject (com.emc.metalnx.core.domain.entity.DataGridCollectionAndDataObject)1