Esempio n. 1
0
        public async Task FromException()
        {
            var toThrow = new BuildXLException("Got exception?");

            try
            {
                await TaskUtilities.FromException <int>(toThrow);
            }
            catch (BuildXLException ex)
            {
                XAssert.AreSame(toThrow, ex);
                return;
            }

            XAssert.Fail("Expected an exception");
        }