コード例 #1
0
        public void Sub(int minuend, int subtrhend, int expected)
        {
            //Arrange
            var calculator = new UnitTestMethods();

            //Act
            var actual = calculator.Sub(minuend, subtrhend);

            //Assert
            Assert.Equal(expected, actual);
        }
コード例 #2
0
        public void Divide(int num1, int num2, int expected)
        {
            //Arrange
            var calculator = new UnitTestMethods();

            //Act
            var actual = calculator.Div(num1, num2);

            //Assert
            Assert.Equal(expected, actual);
        }
コード例 #3
0
        public void FirstFivePrimeNumbers()
        {
            //Arrange
            var expected    = 11;
            var primeNumber = new UnitTestMethods();
            //Act
            var actual = primeNumber.FirstFivePrimeNumbers();

            //Assert
            Assert.Equal(11, actual);
        }
コード例 #4
0
        public void YourMethodName2()
        {
            //Arrange
            var test = new UnitTestMethods();

            //Act
            string actual = test.YourMethodName2();

            //Assert
            Assert.Equal("HereMyMethod", actual);
        }
コード例 #5
0
        public void GetHello()
        {
            // Arrange
            UnitTestMethods getHello = new UnitTestMethods();

            // Act
            string actual = getHello.SayHello();

            // Assert
            Assert.Equal("Hello!", actual);
        }
コード例 #6
0
        public void Name()
        {
            //Arrange
            var expected = "Anton Kemuro";
            var name     = new UnitTestMethods();
            //Act
            var actual = name.Name();

            //Assert
            Assert.Equal("Anton Kemuro", actual);
        }
コード例 #7
0
        public void FrisbeeThrowing()
        {
            //Arrange
            UnitTestMethods sut = new UnitTestMethods();

            //Act
            var actual = sut.FrisbeeThrowing();

            //Assert
            Assert.Equal("Throw Frisbee", actual);
        }
コード例 #8
0
        public void PayItForward()
        {
            //Arrange
            UnitTestMethods sut = new UnitTestMethods();

            //Act
            var actual = sut.PayItForward();

            //Assert
            Assert.Equal("Make someones day!", actual);
        }
コード例 #9
0
        public void YourMethodName()
        {
            var    testStarted = new UnitTestMethods();
            string actual      = testStarted.YourMethodName();

            Assert.Equal("Test has started", actual);

            //Arrange
            //Act
            //Assert
        }
コード例 #10
0
        public void Divide(int num1, int num2, int expected)
        {
            //Arrange
            UnitTestMethods sut = new UnitTestMethods();

            //Act
            int actual = sut.Divide(num1, num2);

            //Assert
            Assert.Equal(expected, actual);
        }
コード例 #11
0
        public void Statement()
        {
            //Arrange
            var test = new UnitTestMethods();

            //Act
            var actual = test.Statement(true);

            //Assert
            Assert.True(actual);
        }
コード例 #12
0
        public void Divide(int num1, int num2, int expected)
        {
            //Arrange
            var sut = new UnitTestMethods();

            //Act
            var actual = sut.DivideMethod(num1, num2);

            //Assert
            Assert.Equal(actual, expected);
        }
コード例 #13
0
        public void Subtract(int minuend, int subtrhend, int expected)
        {
            //Arrange
            var sut = new UnitTestMethods();

            //Act
            var actual = sut.SubtractMethod(minuend, subtrhend);

            //Assert
            Assert.Equal(actual, expected);
        }
コード例 #14
0
        public void FamousLyricIJustCalledToSay()
        {
            //Arrange
            UnitTestMethods test = new UnitTestMethods();

            //Act
            string actual = test.FamousLyricIJustCalledToSay();

            //Assert
            Assert.Equal("I Love You!", actual);
        }
コード例 #15
0
        public void Add(int num1, int num2, int num3, int expected)
        {
            var test = new UnitTestMethods();
            //Arrange: prepare the code we'll need to call the Add method

            //Act
            var actual = test.Add(num1, num2, num3);

            //Assert
            Assert.Equal(expected, actual);
        }
コード例 #16
0
        public void YourMethodName2()
        {
            //Arrange
            UnitTestMethods unittests = new UnitTestMethods();

            //Act
            string actual = unittests.YourMethodName2();

            //Assert
            Assert.Equal("YourMethodName2", actual);
        }
コード例 #17
0
        public void Subtract(int minuend, int subtrhend, int expected)
        {
            //Arrange
            var obj = new UnitTestMethods();

            //Act
            var actual = obj.Subtract(minuend, subtrhend);

            //Assert
            Assert.Equal(expected, actual);
        }
コード例 #18
0
        public void Divide(int num1, int num2, int expected)
        {
            //Arrange
            var obj = new UnitTestMethods();

            //Act
            var actual = obj.Divide(num1, num2);

            //Assert
            Assert.Equal(expected, actual);
        }
コード例 #19
0
        public void AddTester(int num1, int num2, int num3, int expected)
        {
            //Arrange
            var add = new UnitTestMethods();
            //Act
            var actual = add.Add(num1, num2, num3);
            //Assert
            Assert.Equal(actual, expected);
            

        }
コード例 #20
0
        public void Add(int num1, int num2, int num3, int expected)
        {
            //Arrange
            var obj = new UnitTestMethods();

            //Act
            var actual = obj.Add(num1, num2, num3);

            //Assert
            Assert.Equal(expected, actual);
        }
コード例 #21
0
        public void Multiply(int num1, int num2, int expected)
        {
            //Arrange
            UnitTestMethods tester = new UnitTestMethods();

            //Act
            var actual = tester.Multiply(num1, num2);

            //Assert
            Assert.Equal(expected, actual);
        }
コード例 #22
0
        public void Add(int num1, int num2, int num3, int expected)
        {
            //Arrange
            UnitTestMethods tester = new UnitTestMethods();

            //Act
            int actual = tester.Add(num1, num2, num3);

            //Assert
            Assert.Equal(expected, actual);
        }
コード例 #23
0
        public void Add(int num1, int num2, int num3, int expected)
        {
            //Arrange
            //This creates a method to test
            UnitTestMethods sut = new UnitTestMethods();

            //Act
            int actual = sut.Add(num1, num2, num3);

            //Assert
            Assert.Equal(expected, actual);
        }
コード例 #24
0
        public void Bank()
        {
            //Arrange
            var expected = 'b';
            var tester   = new UnitTestMethods();

            //Act
            var actual = tester.ReturnH;

            //Assert
            Assert.Equal(expected, actual);
        }
コード例 #25
0
        public void Add3And3()
        {
            //Arrange
            var num = new UnitTestMethods();
            //Act

            var actual   = num.Add3And3();
            var expected = 6;

            //Assert
            Assert.Equal(expected, actual);
        }
コード例 #26
0
        public void Multiply(int num1, int num2, int expected)
        {
            //Arrange

            var multiplication = new UnitTestMethods();
            //Act

            var actual = multiplication.Multiply(num1, num2);

            //Assert
            Assert.Equal(expected, actual);
        }
コード例 #27
0
        public void MyMethod()
        {
            //Arrange
            var test     = new UnitTestMethods();
            var d        = "Derek";
            var expected = "Derek";
            //Act
            var actual = test.MyMethod(d);

            //Assert
            Assert.Equal(expected, actual);
        }
コード例 #28
0
        public void ReturnHelloWorld()
        {
            //Arrange
            var returnHW = new UnitTestMethods();
            string answer = "Hello, World!";

            //Act
            var actual = returnHW.ReturnHelloWorld();

            //Assert
            Assert.Equal(answer, actual);
        }
コード例 #29
0
        //[InlineData(null, 0)]
        public void Add(int[] arr, int expected)
        {
            //Arrange
            var add = new UnitTestMethods();

            //Act
            int x = 0;
            var actual = add.Add(x, expected);

            //Assert
            Assert.Equal(actual, expected);
        }
コード例 #30
0
        public void Subtract(int minuend, int subtrahend, int expected)
        {
            var test = new UnitTestMethods();
            //Arrange

            //Act
            var actual = test.Subtract(minuend, subtrahend);

            //Squiggly because there's not test to run? Yeah!
            //Assert
            Assert.Equal(expected, actual);
        }