summaryrefslogtreecommitdiff
path: root/dsa/NUnitTestProject1/Auxiliary/Calculator/ArgumentTests.cs
blob: 3e8dbeb332ef661ae2c4ce68a4cfb28895fcf73f (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
49
50
51
52
53
54
55
56
57
58
59
using DSALib.Auxiliary.Calculator;
using Moq;
using NUnit.Framework;

namespace NUnitTest.Auxiliary.Calculator
{
    [TestFixture]
    public class ArgumentTests
    {
        private MockRepository mockRepository;



        [SetUp]
        public void SetUp()
        {
            this.mockRepository = new MockRepository(MockBehavior.Strict);


        }

        [TearDown]
        public void TearDown()
        {
            this.mockRepository.VerifyAll();
        }

        private Argument CreateArgument()
        {
            return new Argument("3");
        }

        [Test]
        public void Solve_StateUnderTest_ExpectedBehavior()
        {
            // Arrange
            var unitUnderTest = this.CreateArgument();

            // Act
            var result = unitUnderTest.Solve();

            // Assert
            Assert.AreEqual(3, result);
        }

        [Test]
        public void ToString_StateUnderTest_ExpectedBehavior()
        {
            // Arrange
            var unitUnderTest = this.CreateArgument();

            // Act
            var result = unitUnderTest.ToString();

            // Assert
            Assert.AreEqual("3", result);
        }
    }
}