@@ -65,6 +65,7 @@ public void _ShouldWorkProperly()
6565 IgnoreIntellisense = true ,
6666 } ) ;
6767 var list = IntellisenseParser . ProcessFile ( item ) . ToList ( ) ;
68+ var tsFile = IntellisenseWriter . WriteTypeScript ( list ) ;
6869
6970 //Assert
7071 Assert . IsNotNull ( list ) ;
@@ -116,10 +117,21 @@ public void _ShouldWorkProperly()
116117 Assert . AreEqual ( false , list [ 0 ] . Properties [ 4 ] . Type . IsDictionary ) ;
117118 Assert . AreEqual ( true , list [ 0 ] . Properties [ 4 ] . Type . IsKnownType ) ;
118119 Assert . AreEqual ( false , list [ 0 ] . Properties [ 4 ] . Type . IsOptional ) ;
119- Assert . AreEqual ( 11 , list [ 0 ] . Properties [ 4 ] . Type . Shape . Count ( ) ) ;
120+ Assert . AreEqual ( 13 , list [ 0 ] . Properties [ 4 ] . Type . Shape . Count ( ) ) ;
121+ // Inc6
120122 Assert . AreEqual ( "System.Guid" , list [ 0 ] . Properties [ 4 ] . Type . Shape . First ( o => o . Name == "Inc6" ) . Type . CodeName ) ;
121123 Assert . AreNotEqual ( "any" , list [ 0 ] . Properties [ 4 ] . Type . Shape . First ( o => o . Name == "Inc6" ) . Type . TypeScriptName ) ;
122124 Assert . AreEqual ( "string" , list [ 0 ] . Properties [ 4 ] . Type . Shape . First ( o => o . Name == "Inc6" ) . Type . TypeScriptName ) ;
125+ // Inc13
126+ Assert . AreEqual ( "System.Collections.Generic.Dictionary<string, int>" , list [ 0 ] . Properties [ 4 ] . Type . Shape . First ( o => o . Name == "Inc13" ) . Type . CodeName ) ;
127+ Assert . AreEqual ( "System.Collections.Generic.Dictionary" , list [ 0 ] . Properties [ 4 ] . Type . Shape . First ( o => o . Name == "Inc13" ) . Type . ClientSideReferenceName ) ;
128+ Assert . AreEqual ( true , list [ 0 ] . Properties [ 4 ] . Type . Shape . First ( o => o . Name == "Inc13" ) . Type . IsDictionary ) ;
129+ Assert . AreEqual ( "{ [index: string]: number }" , list [ 0 ] . Properties [ 4 ] . Type . Shape . First ( o => o . Name == "Inc13" ) . Type . TypeScriptName ) ;
130+ // Inc14
131+ Assert . AreEqual ( "System.Collections.Generic.IDictionary<string, int>" , list [ 0 ] . Properties [ 4 ] . Type . Shape . First ( o => o . Name == "Inc14" ) . Type . CodeName ) ;
132+ Assert . AreEqual ( "System.Collections.Generic.IDictionary" , list [ 0 ] . Properties [ 4 ] . Type . Shape . First ( o => o . Name == "Inc14" ) . Type . ClientSideReferenceName ) ;
133+ Assert . AreEqual ( true , list [ 0 ] . Properties [ 4 ] . Type . Shape . First ( o => o . Name == "Inc14" ) . Type . IsDictionary ) ;
134+ Assert . AreEqual ( "{ [index: string]: number }" , list [ 0 ] . Properties [ 4 ] . Type . Shape . First ( o => o . Name == "Inc14" ) . Type . TypeScriptName ) ;
123135 }
124136
125137 [ Test ]
@@ -137,7 +149,7 @@ public void _ShouldWorkProperly2()
137149
138150 ProjectItem item = worker . GetProjectItem ( dte2 . Solution , "SomeClass.cs" ) ;
139151
140- var expectedFile =
152+ var expectedFile =
141153 "// ------------------------------------------------------------------------------\n " +
142154 "// <auto-generated>\n " +
143155 "// This file was generated by TypeScript Definition Generator v2.2.0.0\n " +
@@ -175,7 +187,7 @@ public void _ShouldWorkProperly2()
175187 Assert . AreEqual ( "ClassLibrary1.SomeClass" , list [ 0 ] . FullName ) ;
176188 Assert . AreEqual ( "SomeClass" , list [ 0 ] . Name ) ;
177189 Assert . AreEqual ( 2 , list [ 0 ] . Properties . Count ) ;
178-
190+
179191 Assert . AreEqual ( "Inc1" , list [ 0 ] . Properties [ 0 ] . Name ) ;
180192 Assert . AreEqual ( "Inc1" , list [ 0 ] . Properties [ 0 ] . NameWithOption ) ;
181193 Assert . AreEqual ( null , list [ 0 ] . Properties [ 0 ] . InitExpression ) ;
0 commit comments