Debian Codegraph @

external/corefx/src/System.Reflection.Emit/tests/MethodBuilder/MethodBuilderContainsGenericParameters.cs

raw
1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4
5 using Xunit;
6
7 namespace System.Reflection.Emit.Tests
8 {
9 public class MethodBuilderContainsGenericParameters
10 {
11 [Fact]
12 public void ContainsGenericParameters_ThrowsNotSupportedException()
13 {
14 TypeBuilder type = Helpers.DynamicType(TypeAttributes.Abstract);
15 MethodBuilder method = type.DefineMethod("TestMethod", MethodAttributes.Public);
16
17 Assert.Throws<NotSupportedException>(() => method.ContainsGenericParameters);
18 }
19 }
20 }