Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Fixed test not using operations
Browse files Browse the repository at this point in the history
Removed duplicated test
  • Loading branch information
Kirbyrawr committed Apr 29, 2020
1 parent 90f1c98 commit 7ef559f
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions stellar-dotnet-sdk-test/ServerCheckMemoRequiredTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public async Task TestCheckOtherOperationTypes()
.Returns(ServerTest.ResponseMessage(HttpStatusCode.OK, BuildAccountResponse(destinations[1])))
.Returns(ServerTest.ResponseMessage(HttpStatusCode.OK, BuildAccountResponse(destinations[2])));

var tx = BuildTransaction(accountId, new Operation[] { }, Memo.Text("foobar"));
var tx = BuildTransaction(accountId, operations, Memo.Text("foobar"));
await _server.CheckMemoRequired(tx);
}

Expand Down Expand Up @@ -182,30 +182,6 @@ public async Task TestSkipCheckIfDestinationIsMuxedAccount()
await _server.CheckMemoRequired(tx);
}

[TestMethod]
public async Task TestIsPaymentOperation()
{
var source = KeyPair.FromSecretSeed("SCH27VUZZ6UAKB67BDNF6FA42YMBMQCBKXWGMFD5TZ6S5ZZCZFLRXKHS");
var destination = KeyPair.FromAccountId("GDW6AUTBXTOC7FIKUO5BOO3OGLK4SF7ZPOBLMQHMZDI45J2Z6VXRB5NR");

var pathPaymentStrictSendOperation = new PathPaymentStrictSendOperation.Builder(Asset.CreateNonNativeAsset("ABCD", KeyPair.Random().AccountId), "300", KeyPair.Random(), new AssetTypeNative(), "200").Build();
var pathPaymentStrictReceiveOperation = new PathPaymentStrictReceiveOperation.Builder(Asset.CreateNonNativeAsset("ABCD", KeyPair.Random().AccountId), "300", KeyPair.Random(), new AssetTypeNative(), "200").Build();
var accountMergeOperation = new AccountMergeOperation.Builder(KeyPair.Random()).Build();

var account = new Account(source.AccountId, 2908908335136768L);
var builder = new TransactionBuilder(account)
.AddOperation(pathPaymentStrictReceiveOperation)
.AddOperation(pathPaymentStrictSendOperation)
.AddOperation(accountMergeOperation);

var transaction = builder.Build();
Assert.AreEqual(2908908335136769L, transaction.SequenceNumber);
Assert.AreEqual(2908908335136769L, account.SequenceNumber);
transaction.Sign(source);

await _server.CheckMemoRequired(transaction);
}

private string BuildAccountResponse(string accountId, Dictionary<string, string> data = null)
{
var accountData = data ?? new Dictionary<string, string>();
Expand Down

0 comments on commit 7ef559f

Please sign in to comment.