Exemplo n.º 1
0
        public void Setup()
        {
            // Initilize Xamarin Forms
            MockForms.Init();

            //This is your App.xaml and App.xaml.cs, which can have resources, etc.
            app = new App();
            Application.Current = app;

            page = new MonsterCreatePage(new GenericViewModel <MonsterModel>(new MonsterModel()));
        }
Exemplo n.º 2
0
        public void MonsterCreatePage_Defense_OnStepperDefenseChanged_Default_Should_Pass()
        {
            // Arrange
            var data      = new MonsterModel();
            var ViewModel = new GenericViewModel <MonsterModel>(data);

            page = new MonsterCreatePage(ViewModel);
            double oldDefense = 0.0;
            double newDefense = 1.0;

            var args = new ValueChangedEventArgs(oldDefense, newDefense);

            // Act
            page.Defense_OnStepperValueChanged(null, args);

            // Reset

            // Assert
            Assert.IsTrue(true); // Got to here, so it happened...
        }
        public void MonsterCreatePage_LevelChanged_Default_Should_Pass()
        {
            // Arrange
            var data      = new MonsterModel();
            var ViewModel = new GenericViewModel <MonsterModel>(data);

            page = new MonsterCreatePage(ViewModel);
            int oldLevel = 1;
            int newLevel = 10;

            var args = new ValueChangedEventArgs(oldLevel, newLevel);

            // Act
            page.Changed_MonsterLevelPicker(null, args);

            // Reset

            // Assert
            Assert.IsTrue(true); // Got to here, so it happened...
        }