2013-03-05 93 views
0

我试图在我的Windows Phone 8应用程序中实现单元测试,但测试运行器不会识别测试。 我正在学习本教程。Windows Phone 8单元测试卡在“运行测试”

Unit Testing In Windows Phone 8 The Basics

using Microsoft.Phone.Testing; 
using Microsoft.VisualStudio.TestTools.UnitTesting; 

namespace PPS.Tests 
{ 
[TestClass] 
class SampleTest 
{ 
    [Tag("SimpleTests")] 
    [TestMethod] 
    public void SimpleTest() 
    { 
     int a = 1; 
     int b = 2; 

     int c = a + b; 

     Assert.IsTrue(c == 4); 
    } 
} 
} 

enter image description here

回答

0

我敢肯定你的测试类需要公开,没有INTERAL(这将是默认值)即:

public class SampleTest