Example #1
0
        public IEnumerator Subtract_9Minus4_Equals5()
        {
            // Arrange
            GameObject     gameObject     = new GameObject();
            CalculatorDemo calculatorDemo = gameObject.AddComponent <CalculatorDemo>();

            // Wait for new GameObject's Start() to complete
            yield return(null);

            // Act
            float result = calculatorDemo.Calculator.Subtract(9, 4);

            // Asset
            Assert.That(result, Is.EqualTo(5));
        }
Example #2
0
        public IEnumerator Add_10Plus5_Equals15()
        {
            // Arrange
            GameObject     gameObject     = new GameObject();
            CalculatorDemo calculatorDemo = gameObject.AddComponent <CalculatorDemo>();

            // Wait for new GameObject's Start() to complete
            yield return(null);

            // Act
            float result = calculatorDemo.Calculator.Add(10, 5);

            // Asset
            Assert.That(result, Is.EqualTo(15));
        }