Skip to content

Instantly share code, notes, and snippets.

@devjaime
Created March 18, 2019 02:11
Show Gist options
  • Select an option

  • Save devjaime/606c3797abe6566afee6f819fb43dfe5 to your computer and use it in GitHub Desktop.

Select an option

Save devjaime/606c3797abe6566afee6f819fb43dfe5 to your computer and use it in GitHub Desktop.
modo manual
/// <summary>This class contains parameterized unit tests for Account</summary>
[PexClass(typeof(Account))]
[PexAllowedExceptionFromTypeUnderTest(typeof(InvalidOperationException))]
[PexAllowedExceptionFromTypeUnderTest(typeof(ArgumentException), AcceptExceptionSubtypes = true)]
[TestClass]
public partial class AccountTest
{
/// <summary>Test stub for get_CurrentBallance()</summary>
[PexMethod]
public double CurrentBallanceGetTest([PexAssumeUnderTest]Account target)
{
double result = target.CurrentBallance;
return result;
// TODO: add assertions to method AccountTest.CurrentBallanceGetTest(Account)
}
/// <summary>Test stub for Deposit(Double)</summary>
[PexMethod]
public double DepositTest([PexAssumeUnderTest]Account target, double amount)
{
double result = target.Deposit(amount);
return result;
// TODO: add assertions to method AccountTest.DepositTest(Account, Double)
}
/// <summary>Test stub for Withdraw(Double)</summary>
[PexMethod]
public double WithdrawTest([PexAssumeUnderTest]Account target, double amount)
{
double result = target.Withdraw(amount);
return result;
// TODO: add assertions to method AccountTest.WithdrawTest(Account, Double)
}
[PexMethod]
public double CurrentBallanceGet([PexAssumeUnderTest]Account target)
{
double result = target.CurrentBallance;
return result;
// TODO: add assertions to method AccountTest.CurrentBallanceGet(Account)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment