public void MethodWithStringArrayParameterIsPreferredToMethodWithNoParameters() { MethodBase method = ApplicationChooser.GetEntryPoint(typeof(TypeHasMultipleMainMethods)); Assert.IsNotNull(method); Assert.AreEqual(1, method.GetParameters().Length); Assert.AreEqual(typeof(string[]), method.GetParameters()[0].ParameterType); }
public void GenericMethodsCanCoexistAndAreIgnored() { MethodBase method = ApplicationChooser.GetEntryPoint(typeof(TypeWithMainMethodsOverloadedByTypeParameterNumber)); Assert.IsNotNull(method); Assert.IsFalse(method.IsGenericMethod); Assert.IsFalse(method.IsGenericMethodDefinition); }
public void MethodCannotTakeOtherParameters() { Assert.IsNull(ApplicationChooser.GetEntryPoint(typeof(MainMethodWithInt32Parameter))); }
public void MethodCannotBeGeneric() { Assert.IsNull(ApplicationChooser.GetEntryPoint(typeof(TypeWithGenericMainMethod))); }
public void TypeCannotBeClosedGeneric() { Assert.IsNull(ApplicationChooser.GetEntryPoint(typeof(GenericTypeWithMainMethod <int>))); }
public void MainMethodCannotHaveStringArrayParameterByRef() { Assert.IsNull(ApplicationChooser.GetEntryPoint(typeof(MainMethodWithStringArrayParameterByRef))); }
public void BothMethodAndTypeCanBePublic() { Assert.IsNotNull(ApplicationChooser.GetEntryPoint(typeof(PublicClassAndPublicMainMethod))); }
public void NoMainMethodTypeIsRejected() { Assert.IsNull(ApplicationChooser.GetEntryPoint(typeof(NoMainMethod))); }