System.Runtime.InteropServices.RuntimeEnvironmentTest.RuntimeEnvironmentNegTest C# (CSharp) Method

RuntimeEnvironmentNegTest() private method

private RuntimeEnvironmentNegTest ( ) : void
return void
        public static void RuntimeEnvironmentNegTest()
        {
            Type clsType = typeof(RuntimeEnvironmentTest);
            Assembly assem = clsType.Assembly;
            Assert.True(!RuntimeEnvironment.FromGlobalAccessCache(assem));

            Assert.Throws<PlatformNotSupportedException>(() => RuntimeEnvironment.SystemConfigurationFile);

            Guid guid;
            Assert.Throws<PlatformNotSupportedException>(() => RuntimeEnvironment.GetRuntimeInterfaceAsObject(guid, guid));
            Assert.Throws<PlatformNotSupportedException>(() => RuntimeEnvironment.GetRuntimeInterfaceAsIntPtr(guid, guid));
        }
    }