update
This commit is contained in:
25
MinMaxTest/UnitTest1.cs
Normal file
25
MinMaxTest/UnitTest1.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
|
||||
namespace MinMaxTest {
|
||||
[TestClass]
|
||||
public class UnitTest1 {
|
||||
MinMax.Adat adat = new MinMax.Adat();
|
||||
|
||||
[TestMethod]
|
||||
public void MinTest() {
|
||||
adat.setNumber(false, new int[] { 1, 2, 3 });
|
||||
int expected = 1;
|
||||
int actual = adat.min();
|
||||
Assert.AreEqual(expected, actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void MaxTest() {
|
||||
adat.setNumber(false, new int[] { 1, 2, 3 });
|
||||
int expected = 3;
|
||||
int actual = adat.max();
|
||||
Assert.AreEqual(expected, actual);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user