This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public interface IAccount | |
| { | |
| double CurrentBallance { get; } | |
| double Deposit(double amount); | |
| double Withdraw(double amount); | |
| } | |
| public class Account : IAccount | |
| { | |
| double _balance; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public interface IAccount | |
| { | |
| double CurrentBallance { get; } | |
| double Deposit(double amount); | |
| double Withdraw(double amount); | |
| } | |
| public class Account : IAccount | |
| { | |
| double _balance; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [TestClass()] | |
| public class AccountTests | |
| { | |
| [TestMethod()] | |
| public void CurrentBallanceTestPositiveCase() | |
| { | |
| IAccount account = new Account(); | |
| account.Deposit(100); | |
| double result = account.CurrentBallance; | |
| Assert.AreEqual(100, result); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Account : IAccount | |
| { | |
| double _balance; | |
| public double CurrentBallance { get { return _balance; } } | |
| public double Deposit(double amount) | |
| { | |
| if (amount > 0) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [TestClass()] | |
| public class AccountTests | |
| { | |
| [TestMethod()] | |
| public void DepositTest() | |
| { | |
| Assert.Fail(); | |
| } | |
| [TestMethod()] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public partial class AccountTest | |
| { | |
| [TestMethod] | |
| [PexGeneratedBy(typeof(AccountTest))] | |
| [ExpectedException(typeof(ArgumentException))] | |
| public void DepositTestThrowsArgumentException836() | |
| { | |
| Account account; | |
| double d; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Windows.Input; | |
| using Xamarin.Essentials; | |
| using Xamarin.Forms; | |
| namespace Acelerometro.ViewModel | |
| { | |
| public class AccelerometerViewModel : BaseViewModel | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Threading.Tasks; | |
| namespace Acelerometro.ViewModel | |
| { | |
| public class BaseViewModel : ObservableObject | |
| { | |
| bool isBusy; | |
| public bool IsBusy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.Runtime.CompilerServices; | |
| namespace Acelerometro.ViewModel | |
| { | |
| public class ObservableObject : INotifyPropertyChanged | |
| { | |
| protected virtual bool SetProperty<T>(ref T backingStore, T value, [CallerMemberName]string propertyName = "", Action onChanged = null, Func<T, T, bool> validateValue = null) |
OlderNewer