【问题标题】:Windows Phone 8 Unit Test stuck at "Running Tests"Windows Phone 8 单元测试卡在“运行测试”
【发布时间】:2013-03-05 14:07:07
【问题描述】:

我正在尝试在我的 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);
    }
}
}

【问题讨论】:

    标签: unit-testing windows-phone-8 silverlight-toolkit


    【解决方案1】:

    我很确定你的测试类需要公开,而不是内部的(它将是默认的),即:

    public class SampleTest

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-25
      • 1970-01-01
      相关资源
      最近更新 更多