{
System.loadLibrary("SimulatorManager");
System.loadLibrary("RamlParser");
- System.loadLibrary("YamlParser");
System.loadLibrary("oc");
System.loadLibrary("oc_logger");
System.loadLibrary("octbstack");
{
try
{
- simulatorResourceServer.addAttributeBoolean(KEY, true);
+ simulatorResourceServer.addAttributeBoolean(KEY, Boolean.parseBoolean("true"));
}
catch (Exception e)
{
e.printStackTrace();
}
- assertEquals(Boolean.parseBoolean(getValue(KEY) + ""), true);
+ assertEquals(Boolean.parseBoolean(getValue(KEY).toString() + ""), true);
}
public void testaddAttributeString_P01()
try
{
- simulatorResourceServer.addAttributeBoolean(KEY, true);
+ simulatorResourceServer.addAttributeBoolean(KEY, Boolean.parseBoolean("true"));
}
catch (Exception e)
{
try
{
- simulatorResourceServer.updateAttributeBoolean(KEY, false);
+ simulatorResourceServer.updateAttributeBoolean(KEY, Boolean.parseBoolean("false"));
}
catch (Exception e)
{
try
{
- lockObject.await(10,TimeUnit.SECONDS);
+ lockObject.await(15,TimeUnit.SECONDS);
}
catch (InterruptedException e)
{
{
result = false;
}
- assertTrue(result && id == -1);
+ assertTrue(!result && id == 0);
}
public void testStartAttributeAutomation_P01()
int id = 0;
try
{
- id = simulatorResourceServer.startAttributeAutomation(simulatorResourceServer.getModel().getAttributes().get(0).getName(),
+ simulatorResourceServer.addAttributeInteger(KEY, 10);
+ id = simulatorResourceServer.startAttributeAutomation(KEY,
AutomationType.NORMAL, automationListener);
}
catch (Exception e)
try
{
- lockObject.await(10, TimeUnit.SECONDS);
+ lockObject.await(05, TimeUnit.SECONDS);
}
catch (InterruptedException e)
{
}
- result = result && automationObject.getResourceURI() != null && automationObject.getAutomationId() != -1 && id != -1;
-
try
{
simulatorResourceServer.stopAutomation(id);