AcornPublishing_essential-csharp-7e/EssentialCSharp-8.0/src/Chapter05.Tests/Listing05.27.RethrowingAnException.Tests.cs
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_27.Tests
{
    [TestClass]
    public class ThrowingExceptionsTests
    {
        [TestMethod]
        public void Main_ExpectException()
        {
            bool flag = false;

            try
            {
                IntelliTect.TestTools.Console.ConsoleAssert.Expect(
                    "", ThrowingExceptions.Main);
            }
            catch (Exception)
            {
                flag = true;
            }

            Assert.IsTrue(flag);
        }
    }
}