タイトルにあるように、Windowsストアのテストプロジェクトにファイルを含める方法が見つかりません。(標準の.NETテストプロジェクトは正常に機能します)
ソリューションを右クリックして実行します:新しいプロジェクトの追加-> C#-> Windowsストア->単体テストライブラリ(Windowsストアアプリ)
次の定型文を取得します。これに、DeploymentItem属性を追加しました。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
namespace UnitTestLibrary1
{
[TestClass]
public class UnitTest1
{
[TestMethod]
// this does not compile; DeploymentItem attribute not found
[DeploymentItem("wibble.txt")]
public void TestMethod1()
{
}
}
}
だから私は何が欠けていますか?Windows Storeの単体テストにデータを含めることは不可能ですか、それとも別のアプローチが必要ですか?