コード例 #1
0
        public void AgeThisYear_IsInvalid()
        {
            // Arrange
            FutureAge age = new FutureAge();

            age.BirthYear = 2018;
            int?actual;
            int notExpected = 1;

            // Act
            actual = age.AgeThisYear();

            // Assert
            Assert.AreNotEqual(notExpected, actual);
        }
コード例 #2
0
        public void AgeThisYear_IsValid()
        {
            // Arrange
            FutureAge age = new FutureAge();

            age.BirthYear = 2019;
            int?actual;
            int expected = 1;

            // Act
            actual = age.AgeThisYear();

            // Assert
            Assert.AreEqual(expected, actual);
        }