コード例 #1
0
        public void TestRepositoryTest_GetTulipMonthlySales_NotImplementedException_Procedure_1()
        {
            // Arrange
            TulipRepository _tulipRepositoryObj = new TulipRepository();

            // Act
            decimal result = _tulipRepositoryObj.GetTulipMonthlySales(4, 2015);

            // Assert
        }
コード例 #2
0
        public void TestRepositoryTest_GetTulipMonthlySales_NotImplementedException_Procedure_2()
        {
            // Arrange
            Exception       expectedException   = null;
            TulipRepository _tulipRepositoryObj = new TulipRepository();

            // Act
            try
            {
                // This will give out an exception.
                decimal result = _tulipRepositoryObj.GetTulipMonthlySales(4, 2015);
            }
            catch (Exception ex)
            {
                expectedException = ex;
            }

            // Assert
            Assert.IsNotNull(expectedException);
            Assert.IsInstanceOfType(expectedException, typeof(NotImplementedException));
        }