Search in sources :

Example 1 with MockInterpreterA

use of org.apache.zeppelin.interpreter.remote.mock.MockInterpreterA in project SSM by Intel-bigdata.

the class InterpreterTest method testDefaultProperty.

@Test
public void testDefaultProperty() {
    Properties p = new Properties();
    p.put("p1", "v1");
    MockInterpreterA intp = new MockInterpreterA(p);
    assertEquals(1, intp.getProperty().size());
    assertEquals("v1", intp.getProperty().get("p1"));
    assertEquals("v1", intp.getProperty("p1"));
}
Also used : Properties(java.util.Properties) MockInterpreterA(org.apache.zeppelin.interpreter.remote.mock.MockInterpreterA) Test(org.junit.Test)

Example 2 with MockInterpreterA

use of org.apache.zeppelin.interpreter.remote.mock.MockInterpreterA in project SSM by Intel-bigdata.

the class InterpreterTest method testOverriddenProperty.

@Test
public void testOverriddenProperty() {
    Properties p = new Properties();
    p.put("p1", "v1");
    MockInterpreterA intp = new MockInterpreterA(p);
    Properties overriddenProperty = new Properties();
    overriddenProperty.put("p1", "v2");
    intp.setProperty(overriddenProperty);
    assertEquals(1, intp.getProperty().size());
    assertEquals("v2", intp.getProperty().get("p1"));
    assertEquals("v2", intp.getProperty("p1"));
}
Also used : Properties(java.util.Properties) MockInterpreterA(org.apache.zeppelin.interpreter.remote.mock.MockInterpreterA) Test(org.junit.Test)

Aggregations

Properties (java.util.Properties)2 MockInterpreterA (org.apache.zeppelin.interpreter.remote.mock.MockInterpreterA)2 Test (org.junit.Test)2