blob: cf2c1b485aedbc635c0a4b17bdd7df56863fb640 (
plain)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
using DSALib.Auxiliary.Calculator;
using Moq;
using NUnit.Framework;
namespace NUnitTest.Auxiliary.Calculator {
[TestFixture]
public class ArgumentTests {
[SetUp]
public void SetUp() {
mockRepository = new MockRepository(MockBehavior.Strict);
}
[TearDown]
public void TearDown() {
mockRepository.VerifyAll();
}
private MockRepository mockRepository;
private Argument CreateArgument() {
return new Argument("3");
}
[Test]
public void Solve_StateUnderTest_ExpectedBehavior() {
// Arrange
var unitUnderTest = CreateArgument();
// Act
var result = unitUnderTest.Solve();
// Assert
Assert.AreEqual(3, result);
}
[Test]
public void ToString_StateUnderTest_ExpectedBehavior() {
// Arrange
var unitUnderTest = CreateArgument();
// Act
var result = unitUnderTest.ToString();
// Assert
Assert.AreEqual("3", result);
}
}
}
|