Created
February 16, 2017 15:04
-
-
Save chomado/9f211e8b3b04aaba05b450b3c59f1f37 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using LiveUnitTestSample; | |
namespace UnitTestProject1 | |
{ | |
[TestClass] | |
public class UnitTest1 | |
{ | |
[TestMethod] | |
public void TestMethod1() | |
{ | |
// さっき作った Add 関数を呼んでいる | |
var answer = Calc.Add(2, 3); | |
// 期待される値と、実際の値を比較し、 | |
// 一致したら「テスト成功」(ユニットテスト) | |
Assert.AreEqual(expected: 5, actual: answer); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment