@@ -46,23 +46,14 @@ public void SetUp()
46
46
}
47
47
48
48
[ Test ]
49
- public void ShouldNotTransformJsxIfNoAnnotationPresent ( )
49
+ public void ShouldTransformJsx ( )
50
50
{
51
51
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>" ;
61
52
_jsxTransformer . TransformJsx ( input ) ;
62
53
63
54
_environment . Verify ( x => x . ExecuteWithLargerStackIfRequired < string > (
64
55
"ReactNET_transform" ,
65
- "/** @jsx React.DOM */ <div>Hello World</div>" ,
56
+ "<div>Hello World</div>" ,
66
57
false
67
58
) ) ;
68
59
}
@@ -72,11 +63,11 @@ public void ShouldWrapExceptionsInJsxExeption()
72
63
{
73
64
_environment . Setup ( x => x . ExecuteWithLargerStackIfRequired < string > (
74
65
"ReactNET_transform" ,
75
- "/** @jsx React.DOM */ <div>Hello World</div>" ,
66
+ "<div>Hello World</div>" ,
76
67
false
77
68
) ) . Throws ( new Exception ( "Something broke..." ) ) ;
78
69
79
- const string input = "/** @jsx React.DOM */ <div>Hello World</div>" ;
70
+ const string input = "<div>Hello World</div>" ;
80
71
Assert . Throws < JsxException > ( ( ) => _jsxTransformer . TransformJsx ( input ) ) ;
81
72
}
82
73
@@ -87,7 +78,7 @@ public void ShouldThrowIfEngineNotSupported()
87
78
88
79
Assert . Throws < JsxUnsupportedEngineException > ( ( ) =>
89
80
{
90
- _jsxTransformer . TransformJsx ( "/** @jsx React.DOM */ <div>Hello world</div>" ) ;
81
+ _jsxTransformer . TransformJsx ( "<div>Hello world</div>" ) ;
91
82
} ) ;
92
83
}
93
84
@@ -124,13 +115,13 @@ public void ShouldTransformJsxIfFileCacheHashInvalid()
124
115
SetUpEmptyCache ( ) ;
125
116
_fileSystem . Setup ( x => x . FileExists ( "foo.generated.js" ) ) . Returns ( true ) ;
126
117
_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>" ) ;
128
119
_fileCacheHash . Setup ( x => x . ValidateHash ( It . IsAny < string > ( ) , It . IsAny < string > ( ) ) ) . Returns ( false ) ;
129
120
130
121
_jsxTransformer . TransformJsxFile ( "foo.jsx" ) ;
131
122
_environment . Verify ( x => x . ExecuteWithLargerStackIfRequired < string > (
132
123
"ReactNET_transform" ,
133
- "/** @jsx React.DOM */ <div>Hello World</div>" ,
124
+ "<div>Hello World</div>" ,
134
125
false
135
126
) ) ;
136
127
}
@@ -140,23 +131,23 @@ public void ShouldTransformJsxIfNoCache()
140
131
{
141
132
SetUpEmptyCache ( ) ;
142
133
_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>" ) ;
144
135
145
136
_jsxTransformer . TransformJsxFile ( "foo.jsx" ) ;
146
137
_environment . Verify ( x => x . ExecuteWithLargerStackIfRequired < string > (
147
138
"ReactNET_transform" ,
148
- "/** @jsx React.DOM */ <div>Hello World</div>" ,
139
+ "<div>Hello World</div>" ,
149
140
false
150
141
) ) ;
151
142
}
152
143
153
144
[ Test ]
154
145
public void ShouldSaveTransformationResult ( )
155
146
{
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>" ) ;
157
148
_environment . Setup ( x => x . ExecuteWithLargerStackIfRequired < string > (
158
149
"ReactNET_transform" ,
159
- "/** @jsx React.DOM */ <div>Hello World</div>" ,
150
+ "<div>Hello World</div>" ,
160
151
false
161
152
) ) . Returns ( "React.DOM.div('Hello World')" ) ;
162
153
0 commit comments