From 783d0705456bfbd5e0cf491a4ef321e82b064e20 Mon Sep 17 00:00:00 2001 From: Kirbyrawr Date: Thu, 24 Sep 2020 20:08:16 +0200 Subject: [PATCH] Added AccountSponsorshipEffects tests --- .../responses/EffectDeserializerTest.cs | 8 ++++---- .../stellar-dotnet-sdk-test.csproj | 9 +++++++++ .../effectAccountSponsorshipCreated.json | 18 ++++++++++++++++++ .../effectAccountSponsorshipRemoved.json | 18 ++++++++++++++++++ .../effectAccountSponsorshipUpdated.json | 19 +++++++++++++++++++ 5 files changed, 68 insertions(+), 4 deletions(-) create mode 100644 stellar-dotnet-sdk-test/testdata/effects/effectAccountSponsorshipCreated.json create mode 100644 stellar-dotnet-sdk-test/testdata/effects/effectAccountSponsorshipRemoved.json create mode 100644 stellar-dotnet-sdk-test/testdata/effects/effectAccountSponsorshipUpdated.json diff --git a/stellar-dotnet-sdk-test/responses/EffectDeserializerTest.cs b/stellar-dotnet-sdk-test/responses/EffectDeserializerTest.cs index f2d186ef4..8ad9925a2 100644 --- a/stellar-dotnet-sdk-test/responses/EffectDeserializerTest.cs +++ b/stellar-dotnet-sdk-test/responses/EffectDeserializerTest.cs @@ -933,7 +933,7 @@ private static void AssertAccountSponsorshipCreatedData(EffectResponse instance) Assert.IsTrue(instance is AccountSponsorshipCreatedEffectResponse); var effect = (AccountSponsorshipCreatedEffectResponse)instance; - Assert.AreEqual("GDPFGP4IPE5DXG6XRXC4ZBUI43PAGRQ5VVNJ3LJTBXDBZ4ITO6HBHNSF", effect.Sponsor); + Assert.AreEqual("GCBQ6JRBPF3SXQBQ6SO5MRBE7WVV4UCHYOSHQGXSZNPZLFRYVYOWBZRQ", effect.Sponsor); } //Account Sponsorship Removed @@ -953,7 +953,7 @@ private static void AssertAccountSponsorshipRemovedData(EffectResponse instance) Assert.IsTrue(instance is AccountSponsorshipRemovedEffectResponse); var effect = (AccountSponsorshipRemovedEffectResponse)instance; - Assert.AreEqual("GDPFGP4IPE5DXG6XRXC4ZBUI43PAGRQ5VVNJ3LJTBXDBZ4ITO6HBHNSF", effect.FormerSponsor); + Assert.AreEqual("GCBQ6JRBPF3SXQBQ6SO5MRBE7WVV4UCHYOSHQGXSZNPZLFRYVYOWBZRQ", effect.FormerSponsor); } @@ -974,8 +974,8 @@ private static void AssertAccountSponsorshipUpdatedData(EffectResponse instance) Assert.IsTrue(instance is AccountSponsorshipUpdatedEffectResponse); var effect = (AccountSponsorshipUpdatedEffectResponse)instance; - Assert.AreEqual("GDPFGP4IPE5DXG6XRXC4ZBUI43PAGRQ5VVNJ3LJTBXDBZ4ITO6HBHNSF", effect.FormerSponsor); - Assert.AreEqual("GDPFGP4IPE5DXG6XRXC4ZBUI43PAGRQ5VVNJ3LJTBXDBZ4ITO6HBHNSF", effect.NewSponsor); + Assert.AreEqual("GCBQ6JRBPF3SXQBQ6SO5MRBE7WVV4UCHYOSHQGXSZNPZLFRYVYOWBZRQ", effect.FormerSponsor); + Assert.AreEqual("GBVFLWXYCIGPO3455XVFIKHS66FCT5AI64ZARKS7QJN4NF7K5FOXTJNL", effect.NewSponsor); } } } diff --git a/stellar-dotnet-sdk-test/stellar-dotnet-sdk-test.csproj b/stellar-dotnet-sdk-test/stellar-dotnet-sdk-test.csproj index 42549e490..0ef74f7f7 100644 --- a/stellar-dotnet-sdk-test/stellar-dotnet-sdk-test.csproj +++ b/stellar-dotnet-sdk-test/stellar-dotnet-sdk-test.csproj @@ -44,6 +44,15 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + PreserveNewest diff --git a/stellar-dotnet-sdk-test/testdata/effects/effectAccountSponsorshipCreated.json b/stellar-dotnet-sdk-test/testdata/effects/effectAccountSponsorshipCreated.json new file mode 100644 index 000000000..389d535de --- /dev/null +++ b/stellar-dotnet-sdk-test/testdata/effects/effectAccountSponsorshipCreated.json @@ -0,0 +1,18 @@ +{ + "_links": { + "operation": { + "href": "http://horizon-testnet.stellar.org/operations/65571265847297" + }, + "succeeds": { + "href": "http://horizon-testnet.stellar.org/effects?order=desc&cursor=65571265847297-1" + }, + "precedes": { + "href": "http://horizon-testnet.stellar.org/effects?order=asc&cursor=65571265847297-1" + } + }, + "id": "0000065571265847297-0000000001", + "paging_token": "65571265847297-1", + "sponsor": "GCBQ6JRBPF3SXQBQ6SO5MRBE7WVV4UCHYOSHQGXSZNPZLFRYVYOWBZRQ", + "type": "account_sponsorship_created", + "type_i": 60 +} diff --git a/stellar-dotnet-sdk-test/testdata/effects/effectAccountSponsorshipRemoved.json b/stellar-dotnet-sdk-test/testdata/effects/effectAccountSponsorshipRemoved.json new file mode 100644 index 000000000..13307fe61 --- /dev/null +++ b/stellar-dotnet-sdk-test/testdata/effects/effectAccountSponsorshipRemoved.json @@ -0,0 +1,18 @@ +{ + "_links": { + "operation": { + "href": "http://horizon-testnet.stellar.org/operations/65571265847297" + }, + "succeeds": { + "href": "http://horizon-testnet.stellar.org/effects?order=desc&cursor=65571265847297-1" + }, + "precedes": { + "href": "http://horizon-testnet.stellar.org/effects?order=asc&cursor=65571265847297-1" + } + }, + "id": "0000065571265847297-0000000001", + "paging_token": "65571265847297-1", + "former_sponsor": "GCBQ6JRBPF3SXQBQ6SO5MRBE7WVV4UCHYOSHQGXSZNPZLFRYVYOWBZRQ", + "type": "account_sponsorship_removed", + "type_i": 62 +} diff --git a/stellar-dotnet-sdk-test/testdata/effects/effectAccountSponsorshipUpdated.json b/stellar-dotnet-sdk-test/testdata/effects/effectAccountSponsorshipUpdated.json new file mode 100644 index 000000000..52e7ebb97 --- /dev/null +++ b/stellar-dotnet-sdk-test/testdata/effects/effectAccountSponsorshipUpdated.json @@ -0,0 +1,19 @@ +{ + "_links": { + "operation": { + "href": "http://horizon-testnet.stellar.org/operations/65571265847297" + }, + "succeeds": { + "href": "http://horizon-testnet.stellar.org/effects?order=desc&cursor=65571265847297-1" + }, + "precedes": { + "href": "http://horizon-testnet.stellar.org/effects?order=asc&cursor=65571265847297-1" + } + }, + "id": "0000065571265847297-0000000001", + "paging_token": "65571265847297-1", + "former_sponsor": "GCBQ6JRBPF3SXQBQ6SO5MRBE7WVV4UCHYOSHQGXSZNPZLFRYVYOWBZRQ", + "new_sponsor": "GBVFLWXYCIGPO3455XVFIKHS66FCT5AI64ZARKS7QJN4NF7K5FOXTJNL", + "type": "account_sponsorship_updated", + "type_i": 61 +}