[TestMethod] yönteminden bazı bilgileri göstermeye çalışıyorum. Biz bir şey göremiyorum çünkü çalışmaz VS2010 ve Console.WriteLine
ile Embebed Test araçları kullanmak[TestMethod] öğesinden Console.WriteLine nasıl alınır?
Genellikle NUnit ve bir çizgi Console.WriteLine
çalışır ince ve biz 'çıktı' penceresinde görebilirsiniz ile kullanmak, ancak bu proje üzerinde buna mecburuz .
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Test1
{
[TestClass]
public class TestNum1
{
[TestMethod]
public void Constructors()
{
for (int b = 1; b < 99; b++) {
Console.WriteLine(b.ToString()); // <<<<<<< This don't show on Output.
Assert.AreEqual(b, b); // This is only a silly sample.
}
}
}
}
kullanabilirsiniz Üzgünüm benim. yinelenen soru ama bir not eklemeliyim: Testlerinizi Hata Ayıklama modunda yürütmelisiniz veya herhangi bir çıktı göremiyorsunuz – ferpega