--- /dev/null
+package io.bytom.types;\r
+\r
+import com.google.gson.Gson;\r
+import org.junit.Test;\r
+\r
+import java.security.InvalidKeyException;\r
+import java.security.NoSuchAlgorithmException;\r
+import java.security.SignatureException;\r
+\r
+public class AssetTest {\r
+ String rootkey = "38d2c44314c401b3ea7c23c54e12c36a527aee46a7f26b82443a46bf40583e439dea25de09b0018b35a741d8cd9f6ec06bc11db49762617485f5309ab72a12d4";\r
+\r
+ @Test\r
+ public void testCreateAsset() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\r
+ Object o = new Object();\r
+ Asset.Definition definition = new Asset.Definition();\r
+\r
+// "definition": {\r
+// "decimals": 8,\r
+// "description": "Bytom Official Issue",\r
+// "name": "BTM",\r
+// "symbol": "BTM"\r
+// }\r
+ definition.setDecimals(8);\r
+ //{}\r
+ definition.setDescription(o);\r
+ definition.setName("");\r
+ definition.setSymbol("");\r
+\r
+ Asset asset = new Asset();\r
+ asset.CreateAsset(definition, 2, rootkey);\r
+ Gson gson = new Gson();\r
+ String s = gson.toJson(asset);\r
+ System.out.println(s);\r
+ }\r
+}\r