Esempio n. 1
0
 public void Container_DoesNotSupportModules()
 {
     Assert.Throws <NotSupportedException>(() =>
     {
         var app = new PrismApplicationModulesMock();
     });
 }
        public void ThrowsException_If_Container_DoesNotSupportModules()
        {
            PrismApplicationMock app = null;
            var exception            = Record.Exception(() => app = new PrismApplicationModulesMock(new XunitPlatformInitializer(_testOutputHelper)));

            // The app should always be null if we do not support Modules
            if (app == null || !((IContainerExtension)app.Container).SupportsModules)
            {
                _testOutputHelper.WriteLine("Container Does Not Support Modules");
                Assert.NotNull(exception);
                Assert.IsType <NotSupportedException>(exception);
            }
            else
            {
                _testOutputHelper.WriteLine("Container Supports Modules");
            }
        }