use of it.unica.tcs.lib.script.ScriptBuilder2 in project balzac by balzac-lang.
the class ScriptBuilder2Test method test_serialize_signature5.
@Test
public void test_serialize_signature5() {
ECKey key = new ECKey();
SigHash hashType = SigHash.NONE;
ScriptBuilder2 sb = new ScriptBuilder2();
sb.number(15);
sb.signaturePlaceholder(key, hashType, false);
String expected = "15 [sig," + ECKeyStore.getUniqueID(key) + ",*0]";
String actual = sb.serialize();
assertEquals(expected, actual);
}
use of it.unica.tcs.lib.script.ScriptBuilder2 in project balzac by balzac-lang.
the class ScriptBuilder2Test method test_serialize_freeVariable.
@Test
public void test_serialize_freeVariable() {
ScriptBuilder2 sb = new ScriptBuilder2();
sb.number(15);
sb.addVariable("Donald", String.class);
String expected = "15 [var,Donald,java.lang.String]";
String actual = sb.serialize();
assertEquals(expected, actual);
}
Aggregations