~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/BackendBindings/Python/PythonBinding/Test/Converter/BaseClassConversionTestFixture.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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)
 
3
 
 
4
using System;
 
5
using ICSharpCode.NRefactory;
 
6
using ICSharpCode.PythonBinding;
 
7
using NUnit.Framework;
 
8
 
 
9
namespace PythonBinding.Tests.Converter
 
10
{
 
11
        [TestFixture]
 
12
        public class BaseClassConversionTestFixture
 
13
        {
 
14
                string csharp = 
 
15
                        "class Foo : Bar, IMyInterface\r\n" +
 
16
                        "{\r\n" +
 
17
                        "}";
 
18
 
 
19
                [Test]
 
20
                public void ConvertedPythonCode()
 
21
                {
 
22
                        string expectedCode =
 
23
                                "class Foo(Bar, IMyInterface):\r\n" +
 
24
                                "    pass";
 
25
                        NRefactoryToPythonConverter converter = new NRefactoryToPythonConverter(SupportedLanguage.CSharp);
 
26
                        converter.IndentString = "    ";
 
27
                        string code = converter.Convert(csharp);
 
28
                        
 
29
                        Assert.AreEqual(expectedCode, code);
 
30
                }
 
31
        }
 
32
}