-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#13 test read/generate signature request
- Loading branch information
Showing
2 changed files
with
61 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace IOSTSdk.Test | ||
{ | ||
[TestClass] | ||
public class SignatureRequestTests | ||
{ | ||
[TestInitialize] | ||
public void Initialize() | ||
{ | ||
|
||
} | ||
|
||
[TestMethod] | ||
public void TestReadGenerateSR() | ||
{ | ||
var iost = new IOST(null); | ||
|
||
var tx = iost.NewTransaction(); | ||
|
||
var pubk = "Gcv8c2tH8qZrUYnKdEEdTtASsxivic2834MQW6mgxqto"; | ||
tx.CreateAccount("newname", "creator", pubk, pubk); | ||
|
||
var bb1 = tx.BytesForSigning(); | ||
|
||
string sig = tx.CreateSignatureRequest("some tag", Transaction.SRTRANSFERMETHOD_CLIENTCANTRANFER); | ||
|
||
var readSig = Transaction.ReadSignatureRequest(sig); | ||
|
||
CollectionAssert.AreEqual(bb1, Transaction.ToBytesForSigning(readSig.TransferDetails)); | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters