Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do unit testing in Windows Phone 8.1 RT?

Anyone knows how to do unit testing in a WP 8.1 RT app? There is almost no resources in the internet about this or even WinRT.

like image 702
Heshan Avatar asked Oct 25 '14 13:10

Heshan


1 Answers

  1. Create a new project inside your solution. Choose a Unit Test App template (see screenshot).
  2. Create a test class with a test method inside that project. This could look like this:

    [TestClass]
    public class FooTestUnit
    {
        [TestMethod]
        public void TestFooBarProperty () {
            int referenceValue = 42;
            int actualValue = methodToTest();
            Assert.AreEqual(referenceValue, actualValue);
        }
    }
    

    }

  3. From the main menu choose: Tests / Run all tests.

enter image description here

like image 94
Fred Avatar answered Oct 13 '22 08:10

Fred