public void GetEntryPointSignature_PrefersStaticMethod() { var testAssembly = typeof(TestFunction1).Assembly; string assemblyPath = new Uri(testAssembly.Location, UriKind.Absolute).LocalPath; var compilation = new RawAssemblyCompilation(assemblyPath, $"{typeof(TestFunction3).FullName}.{nameof(TestFunction3.Run)}"); FunctionSignature signature = compilation.GetEntryPointSignature(new FunctionEntryPointResolver(), testAssembly); Assert.NotNull(signature); Assert.Equal(nameof(TestFunction3.Run), signature.MethodName); }
public void GetEntryPointSignature_BindsToExpectedMethod(string entryPointName, string methodName) { var testAssembly = typeof(TestFunction1).Assembly; string assemblyPath = new Uri(testAssembly.Location, UriKind.Absolute).LocalPath; var compilation = new RawAssemblyCompilation(assemblyPath, entryPointName); FunctionSignature signature = compilation.GetEntryPointSignature(new FunctionEntryPointResolver(), testAssembly); Assert.NotNull(signature); Assert.Equal(methodName, signature.MethodName); }