assertFalse(buffer.btdelattribute("unknow", 0));
}
public void testSet() throws ConnectionException {
log.info("TestNestedBuffer::testSet");
BT_NBF buffer = (BT_NBF) connection.tpalloc("BT_NBF", "employee", 0);
buffer.btaddattribute("id", new Long(1234));
buffer.btaddattribute("id", new Long(1001));
buffer.btaddattribute("name", "test");
assertTrue(buffer.btdelattribute("id", 0));
assertTrue(buffer.btsetattribute("id", 0, new Long(1002)));
Long id = (Long)buffer.btgetattribute("id", 0);
assertTrue(id.longValue() == 1002);
assertTrue(buffer.btsetattribute("id", 1, new Long(1003)));
id = (Long)buffer.btgetattribute("id", 1);
assertTrue(id.longValue() == 1003);
assertTrue(buffer.btsetattribute("name", 0, "test1"));
String name = (String)buffer.btgetattribute("name", 0);
assertTrue("test1".equals(name));
assertTrue(buffer.btdelattribute("name", 0));
assertTrue(buffer.btsetattribute("name", 0, "test2"));
name = (String)buffer.btgetattribute("name", 0);
assertTrue("test2".equals(name));
assertFalse(buffer.btsetattribute("name", 1, "other"));
assertFalse(buffer.btsetattribute("unknow", 0, "nothing"));
}