~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/nrefactory/ICSharpCode.NRefactory.VB.Tests/Output/CodeDOM/CodeDOMTypeReferenceTest.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
Import upstream version 4.0.5+dfsg

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 System.CodeDom;
 
6
using System.Collections.Generic;
 
7
 
 
8
using ICSharpCode.NRefactory.VB.Ast;
 
9
using ICSharpCode.NRefactory.VB.Visitors;
 
10
using NUnit.Framework;
 
11
 
 
12
namespace ICSharpCode.NRefactory.VB.Tests.Output.CodeDom.Tests
 
13
{
 
14
        [TestFixture]
 
15
        public class CodeDOMTypeReferenceTest
 
16
        {
 
17
                [TestAttribute]
 
18
                public void InnerClassTypeReferencTest()
 
19
                {
 
20
                        InnerClassTypeReference ictr = new InnerClassTypeReference(
 
21
                                new TypeReference("OuterClass", new List<TypeReference> { new TypeReference("String") }),
 
22
                                "InnerClass",
 
23
                                new List<TypeReference> { new TypeReference("Int32"), new TypeReference("Int64") });
 
24
                        Assert.AreEqual("OuterClass<String>+InnerClass<Int32,Int64>", ictr.ToString());
 
25
                        CodeTypeOfExpression result = (CodeTypeOfExpression)new TypeOfExpression(ictr).AcceptVisitor(new CodeDomVisitor(), null);
 
26
                        Assert.AreEqual("OuterClass`1+InnerClass`2", result.Type.BaseType);
 
27
                        Assert.AreEqual(3, result.Type.TypeArguments.Count);
 
28
                }
 
29
        }
 
30
}