1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
5
using System.Collections;
6
using System.Collections.Generic;
7
using ICSharpCode.PythonBinding;
8
using ICSharpCode.SharpDevelop.Dom;
9
using ICSharpCode.SharpDevelop.Dom.CSharp;
10
using NUnit.Framework;
11
using PythonBinding.Tests.Utils;
13
namespace PythonBinding.Tests.Resolver
16
public class ResolveTanMethodFromMathImportAllTestFixture : ResolveTestsBase
18
protected override ExpressionResult GetExpressionResult()
20
return new ExpressionResult("tan", ExpressionContext.Default);
23
protected override string GetPythonScript()
26
"from sys import *\r\n" +
27
"from math import *\r\n" +
28
"from socket import *\r\n" +
35
public void ResolveResultIsMethodGroupResolveResult()
37
Assert.IsTrue(resolveResult is MethodGroupResolveResult);
41
public void ResolveResultMethodNameIsTan()
43
Assert.AreEqual("tan", MethodResolveResult.Name);
46
MethodGroupResolveResult MethodResolveResult {
47
get { return (MethodGroupResolveResult)resolveResult; }
51
public void ResolveResultContainingTypeHasOneTanMethods()
53
List<IMethod> tanMethods = GetTanMethods();
54
Assert.AreEqual(1, tanMethods.Count);
57
List<IMethod> GetTanMethods()
59
List<IMethod> methods = MethodResolveResult.ContainingType.GetMethods();
60
return PythonCompletionItemsHelper.FindAllMethodsFromCollection("tan", -1, methods.ToArray());