using System using Microsoft VisualStudio TestTools UnitTesting namesp

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace graph39
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
int n = 6;
int[,] graph = new int[,] {
{0,1,2,0,0,0},
{1,0,3,0,0,0},
{2,3,0,5,0,4},
{0,0,5,0,7,0},
{0,0,0,7,0,6},
{0,0,4,0,6,0}
};
int start = 1;
int end = 5;
int actual = MainClass.Run(n, graph, start, end);
Assert.AreEqual(4, actual);
}
}
}