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
| <views:BasePage xmlns="http://xamarin.com/schemas/2014/forms" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
| xmlns:views="clr-namespace:Acelerometro.View" | |
| xmlns:viewmodels="clr-namespace:Acelerometro.ViewModel" | |
| x:Class="Acelerometro.View.AccelerometerPage" | |
| Title="Accelerometer"> | |
| <views:BasePage.BindingContext> | |
| <viewmodels:AccelerometerViewModel /> | |
| </views:BasePage.BindingContext> |
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
| <views:BasePage xmlns="http://xamarin.com/schemas/2014/forms" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
| xmlns:views="clr-namespace:Acelerometro.View" | |
| xmlns:viewmodels="clr-namespace:Acelerometro.ViewModel" | |
| x:Class="Acelerometro.View.AccelerometerPage" | |
| Title="Accelerometer"> | |
| <views:BasePage.BindingContext> | |
| <viewmodels:AccelerometerViewModel /> | |
| </views:BasePage.BindingContext> |
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.Threading.Tasks; | |
| using Acelerometro.ViewModel; | |
| using Xamarin.Forms; | |
| namespace Acelerometro.View | |
| { | |
| public class BasePage : ContentPage | |
| { | |
| public BasePage() | |
| { |
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) |
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.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
| 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
| /// <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
| [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
| public class Account : IAccount | |
| { | |
| double _balance; | |
| public double CurrentBallance { get { return _balance; } } | |
| public double Deposit(double amount) | |
| { | |
| if (amount > 0) | |
| { |