@@ -46,23 +46,14 @@ public void SetUp()
4646 }
4747
4848 [ Test ]
49- public void ShouldNotTransformJsxIfNoAnnotationPresent ( )
49+ public void ShouldTransformJsx ( )
5050 {
5151 const string input = "<div>Hello World</div>" ;
52-
53- var output = _jsxTransformer . TransformJsx ( input ) ;
54- Assert . AreEqual ( input , output ) ;
55- }
56-
57- [ Test ]
58- public void ShouldTransformJsxIfAnnotationPresent ( )
59- {
60- const string input = "/** @jsx React.DOM */ <div>Hello World</div>" ;
6152 _jsxTransformer . TransformJsx ( input ) ;
6253
6354 _environment . Verify ( x => x . ExecuteWithLargerStackIfRequired < string > (
6455 "ReactNET_transform" ,
65- "/** @jsx React.DOM */ <div>Hello World</div>" ,
56+ "<div>Hello World</div>" ,
6657 false
6758 ) ) ;
6859 }
@@ -72,11 +63,11 @@ public void ShouldWrapExceptionsInJsxExeption()
7263 {
7364 _environment . Setup ( x => x . ExecuteWithLargerStackIfRequired < string > (
7465 "ReactNET_transform" ,
75- "/** @jsx React.DOM */ <div>Hello World</div>" ,
66+ "<div>Hello World</div>" ,
7667 false
7768 ) ) . Throws ( new Exception ( "Something broke..." ) ) ;
7869
79- const string input = "/** @jsx React.DOM */ <div>Hello World</div>" ;
70+ const string input = "<div>Hello World</div>" ;
8071 Assert . Throws < JsxException > ( ( ) => _jsxTransformer . TransformJsx ( input ) ) ;
8172 }
8273
@@ -87,7 +78,7 @@ public void ShouldThrowIfEngineNotSupported()
8778
8879 Assert . Throws < JsxUnsupportedEngineException > ( ( ) =>
8980 {
90- _jsxTransformer . TransformJsx ( "/** @jsx React.DOM */ <div>Hello world</div>" ) ;
81+ _jsxTransformer . TransformJsx ( "<div>Hello world</div>" ) ;
9182 } ) ;
9283 }
9384
@@ -124,13 +115,13 @@ public void ShouldTransformJsxIfFileCacheHashInvalid()
124115 SetUpEmptyCache ( ) ;
125116 _fileSystem . Setup ( x => x . FileExists ( "foo.generated.js" ) ) . Returns ( true ) ;
126117 _fileSystem . Setup ( x => x . ReadAsString ( "foo.generated.js" ) ) . Returns ( "/* filesystem cached invalid */" ) ;
127- _fileSystem . Setup ( x => x . ReadAsString ( "foo.jsx" ) ) . Returns ( "/** @jsx React.DOM */ <div>Hello World</div>" ) ;
118+ _fileSystem . Setup ( x => x . ReadAsString ( "foo.jsx" ) ) . Returns ( "<div>Hello World</div>" ) ;
128119 _fileCacheHash . Setup ( x => x . ValidateHash ( It . IsAny < string > ( ) , It . IsAny < string > ( ) ) ) . Returns ( false ) ;
129120
130121 _jsxTransformer . TransformJsxFile ( "foo.jsx" ) ;
131122 _environment . Verify ( x => x . ExecuteWithLargerStackIfRequired < string > (
132123 "ReactNET_transform" ,
133- "/** @jsx React.DOM */ <div>Hello World</div>" ,
124+ "<div>Hello World</div>" ,
134125 false
135126 ) ) ;
136127 }
@@ -140,23 +131,23 @@ public void ShouldTransformJsxIfNoCache()
140131 {
141132 SetUpEmptyCache ( ) ;
142133 _fileSystem . Setup ( x => x . FileExists ( "foo.generated.js" ) ) . Returns ( false ) ;
143- _fileSystem . Setup ( x => x . ReadAsString ( "foo.jsx" ) ) . Returns ( "/** @jsx React.DOM */ <div>Hello World</div>" ) ;
134+ _fileSystem . Setup ( x => x . ReadAsString ( "foo.jsx" ) ) . Returns ( "<div>Hello World</div>" ) ;
144135
145136 _jsxTransformer . TransformJsxFile ( "foo.jsx" ) ;
146137 _environment . Verify ( x => x . ExecuteWithLargerStackIfRequired < string > (
147138 "ReactNET_transform" ,
148- "/** @jsx React.DOM */ <div>Hello World</div>" ,
139+ "<div>Hello World</div>" ,
149140 false
150141 ) ) ;
151142 }
152143
153144 [ Test ]
154145 public void ShouldSaveTransformationResult ( )
155146 {
156- _fileSystem . Setup ( x => x . ReadAsString ( "foo.jsx" ) ) . Returns ( "/** @jsx React.DOM */ <div>Hello World</div>" ) ;
147+ _fileSystem . Setup ( x => x . ReadAsString ( "foo.jsx" ) ) . Returns ( "<div>Hello World</div>" ) ;
157148 _environment . Setup ( x => x . ExecuteWithLargerStackIfRequired < string > (
158149 "ReactNET_transform" ,
159- "/** @jsx React.DOM */ <div>Hello World</div>" ,
150+ "<div>Hello World</div>" ,
160151 false
161152 ) ) . Returns ( "React.DOM.div('Hello World')" ) ;
162153
0 commit comments