-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unit tests for walletOperations, and cypress test #97
Conversation
funds are null
not sure about the values, @dangershony can you check if the logic is ok?
Unit Tests for WalletOperations: Added tests for wallet word generation, transaction handling with sufficient and insufficient funds, unspent output retrieval, and transaction fee calculation. Cypress Tests : added a test for browse a project, and then invest |
} | ||
|
||
[Fact] | ||
public void CalculateTransactionFee_WithMultipleScenarios() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dangershony glad if you could go over the logic of this test,
mostly on the values, and if there is no need for Assert.Equal(0.00000001m, calculatedFeeSufficient);
// Act & Assert for sufficient funds | ||
var calculatedFeeSufficient = walletOperations.CalculateTransactionFee(sendInfoSufficientFunds, accountInfo, feeRate); | ||
Assert.True(calculatedFeeSufficient > 0); | ||
Assert.Equal(0.00000001m, calculatedFeeSufficient); // Assuming an expected fee for validation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is fine, the fee is exactly the same every time because the size of the trx is fixed and feerate is fixed, so it is fine to keep it.
No description provided.