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.Generic;
6
using System.ComponentModel;
7
using System.ComponentModel.Design;
9
using System.Windows.Forms;
11
using ICSharpCode.PythonBinding;
12
using ICSharpCode.Scripting.Tests.Utils;
13
using IronPython.Compiler.Ast;
14
using NUnit.Framework;
15
using PythonBinding.Tests.Utils;
17
namespace PythonBinding.Tests.Designer
20
/// Tests that the constructor arguments are returned when the first argument is
24
public class DeserializeConstructorStringArrayTestFixture
26
string code = "System.Windows.Forms.ListViewItem(System.Array[System.String](\r\n" +
34
public void SetUpFixture()
36
MockComponentCreator componentCreator = new MockComponentCreator();
37
CallExpression callExpression = PythonParserHelper.GetCallExpression(code);
38
PythonCodeDeserializer deserializer = new PythonCodeDeserializer(componentCreator);
39
args = deserializer.GetArguments(callExpression);
43
public void OneArgument()
45
Assert.AreEqual(1, args.Count);
49
public void ArgumentIsStringArray()
51
string[] array = new string[0];
52
Assert.IsInstanceOf(array.GetType(), args[0]);