Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
VibeNL committed Dec 19, 2023
1 parent b731522 commit 268258f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public async Task ConvertActivitiesForAccount_SingleBuy_Converted()
var account = fixture.Build<Account>().With(x => x.Balance, Balance.Empty(DefaultCurrency.USD)).Create();

api.Setup(x => x.GetAccountByName(account.Name)).ReturnsAsync(account);
api.Setup(x => x.FindSymbolByIdentifier("Storj", It.IsAny<Currency>(), It.IsAny<AssetClass?[]>(), It.IsAny<AssetSubClass?[]>())).ReturnsAsync(asset);
api.Setup(x => x.FindSymbolByIdentifier(new string?[] { "Storj", "STORJ" }, It.IsAny<Currency>(), It.IsAny<AssetClass?[]>(), It.IsAny<AssetSubClass?[]>())).ReturnsAsync(asset);

// Act
account = await parser.ConvertActivitiesForAccount(account.Name, new[] { "./FileImporter/TestFiles/Bitvavo/BuyOrders/single_buy.csv" });
Expand Down Expand Up @@ -110,7 +110,7 @@ public async Task ConvertActivitiesForAccount_SingleSell_Converted()
var account = fixture.Build<Account>().With(x => x.Balance, Balance.Empty(DefaultCurrency.USD)).Create();

api.Setup(x => x.GetAccountByName(account.Name)).ReturnsAsync(account);
api.Setup(x => x.FindSymbolByIdentifier("Cardano", It.IsAny<Currency>(), It.IsAny<AssetClass?[]>(), It.IsAny<AssetSubClass?[]>())).ReturnsAsync(asset);
api.Setup(x => x.FindSymbolByIdentifier(new string?[] { "Cardano", "ADA" }, It.IsAny<Currency>(), It.IsAny<AssetClass?[]>(), It.IsAny<AssetSubClass?[]>())).ReturnsAsync(asset);

// Act
account = await parser.ConvertActivitiesForAccount(account.Name, new[] { "./FileImporter/TestFiles/Bitvavo/SellOrders/single_sell.csv" });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public async Task ConvertActivitiesForAccount_SingleBuy_Converted()
var account = fixture.Build<Account>().With(x => x.Balance, Balance.Empty(DefaultCurrency.EUR)).Create();

api.Setup(x => x.GetAccountByName(account.Name)).ReturnsAsync(account);
api.Setup(x => x.FindSymbolByIdentifier("USD Coin", It.IsAny<Currency>(), It.IsAny<AssetClass?[]>(), It.IsAny<AssetSubClass?[]>())).ReturnsAsync(asset1);
api.Setup(x => x.FindSymbolByIdentifier(new string?[] { "USD Coin", "USDC" }, It.IsAny<Currency>(), It.IsAny<AssetClass?[]>(), It.IsAny<AssetSubClass?[]>())).ReturnsAsync(asset1);

// Act
account = await parser.ConvertActivitiesForAccount(account.Name, new[] { "./FileImporter/TestFiles/Nexo/BuyOrders/single_buy.csv" });
Expand Down Expand Up @@ -96,8 +96,8 @@ public async Task ConvertActivitiesForAccount_SingleConvert_Converted()
var account = fixture.Build<Account>().With(x => x.Balance, Balance.Empty(DefaultCurrency.EUR)).Create();

api.Setup(x => x.GetAccountByName(account.Name)).ReturnsAsync(account);
api.Setup(x => x.FindSymbolByIdentifier("USD Coin", It.IsAny<Currency>(), It.IsAny<AssetClass?[]>(), It.IsAny<AssetSubClass?[]>())).ReturnsAsync(asset1);
api.Setup(x => x.FindSymbolByIdentifier("Bitcoin", It.IsAny<Currency>(), It.IsAny<AssetClass?[]>(), It.IsAny<AssetSubClass?[]>())).ReturnsAsync(asset2);
api.Setup(x => x.FindSymbolByIdentifier(new string?[] { "USD Coin", "USDC" }, It.IsAny<Currency>(), It.IsAny<AssetClass?[]>(), It.IsAny<AssetSubClass?[]>())).ReturnsAsync(asset1);
api.Setup(x => x.FindSymbolByIdentifier(new string?[] { "Bitcoin", "BTC" }, It.IsAny<Currency>(), It.IsAny<AssetClass?[]>(), It.IsAny<AssetSubClass?[]>())).ReturnsAsync(asset2);

// Act
account = await parser.ConvertActivitiesForAccount(account.Name, new[] { "./FileImporter/TestFiles/Nexo/BuyOrders/single_convert.csv" });
Expand Down Expand Up @@ -139,7 +139,7 @@ public async Task ConvertActivitiesForAccount_SingleCashbackCrypto_Converted()
var account = fixture.Build<Account>().With(x => x.Balance, Balance.Empty(DefaultCurrency.EUR)).Create();

api.Setup(x => x.GetAccountByName(account.Name)).ReturnsAsync(account);
api.Setup(x => x.FindSymbolByIdentifier("Bitcoin", It.IsAny<Currency>(), It.IsAny<AssetClass?[]>(), It.IsAny<AssetSubClass?[]>())).ReturnsAsync(asset);
api.Setup(x => x.FindSymbolByIdentifier(new string?[] { "Bitcoin", "BTC" }, It.IsAny<Currency>(), It.IsAny<AssetClass?[]>(), It.IsAny<AssetSubClass?[]>())).ReturnsAsync(asset);

// Act
account = await parser.ConvertActivitiesForAccount(account.Name, new[] { "./FileImporter/TestFiles/Nexo/Specials/single_cashback_crypto.csv" });
Expand Down Expand Up @@ -224,7 +224,7 @@ public async Task ConvertActivitiesForAccount_SingleReferralBonusApproved_Conver
var account = fixture.Build<Account>().With(x => x.Balance, Balance.Empty(DefaultCurrency.EUR)).Create();

api.Setup(x => x.GetAccountByName(account.Name)).ReturnsAsync(account);
api.Setup(x => x.FindSymbolByIdentifier("Bitcoin", It.IsAny<Currency>(), It.IsAny<AssetClass?[]>(), It.IsAny<AssetSubClass?[]>())).ReturnsAsync(asset1);
api.Setup(x => x.FindSymbolByIdentifier(new string?[] { "Bitcoin", "BTC" }, It.IsAny<Currency>(), It.IsAny<AssetClass?[]>(), It.IsAny<AssetSubClass?[]>())).ReturnsAsync(asset1);

// Act
account = await parser.ConvertActivitiesForAccount(account.Name, new[] { "./FileImporter/TestFiles/Nexo/Specials/single_referralbonus_approved.csv" });
Expand Down

0 comments on commit 268258f

Please sign in to comment.