~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Designer/ConvertCustomClassUsingTypeConverterTestFixture.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.RubyBinding;
 
6
using ICSharpCode.Scripting.Tests.Utils;
 
7
using NUnit.Framework;
 
8
 
 
9
namespace RubyBinding.Tests.Designer
 
10
{
 
11
        /// <summary>
 
12
        /// Converts a custom class that has a custom TypeConverter defined.
 
13
        /// This type converter implements an InstanceDescriptor which is used to generate the 
 
14
        /// code to create an instance of the class.
 
15
        /// </summary>
 
16
        [TestFixture]
 
17
        public class ConvertCustomClassUsingTypeConverterTestFixture
 
18
        {               
 
19
                [Test]
 
20
                public void ConvertCustomClass()
 
21
                {
 
22
                        CustomClass customClass = new CustomClass("Test", "Category");
 
23
                        string text = RubyPropertyValueAssignment.ToString(customClass);
 
24
                        string expectedText = "ICSharpCode::Scripting::Tests::Utils::CustomClass.new(\"Test\", \"Category\")";
 
25
                        Assert.AreEqual(expectedText, text);
 
26
                }
 
27
        }
 
28
}