File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -41,15 +41,15 @@ public void RenderHtmlShouldCallRenderComponent()
41
41
} ;
42
42
component . RenderHtml ( ) ;
43
43
44
- environment . Verify ( x => x . Execute < string > ( @"React.renderComponentToString (Foo({""hello"":""World""}))" ) ) ;
44
+ environment . Verify ( x => x . Execute < string > ( @"React.renderToString (Foo({""hello"":""World""}))" ) ) ;
45
45
}
46
46
47
47
[ Test ]
48
48
public void RenderHtmlShouldWrapComponentInDiv ( )
49
49
{
50
50
var environment = new Mock < IReactEnvironment > ( ) ;
51
51
environment . Setup ( x => x . Execute < bool > ( "typeof Foo !== 'undefined'" ) ) . Returns ( true ) ;
52
- environment . Setup ( x => x . Execute < string > ( @"React.renderComponentToString (Foo({""hello"":""World""}))" ) )
52
+ environment . Setup ( x => x . Execute < string > ( @"React.renderToString (Foo({""hello"":""World""}))" ) )
53
53
. Returns ( "[HTML]" ) ;
54
54
55
55
var component = new ReactComponent ( environment . Object , "Foo" , "container" )
@@ -73,7 +73,7 @@ public void RenderJavaScriptShouldCallRenderComponent()
73
73
var result = component . RenderJavaScript ( ) ;
74
74
75
75
Assert . AreEqual (
76
- @"React.renderComponent (Foo({""hello"":""World""}), document.getElementById(""container""))" ,
76
+ @"React.render (Foo({""hello"":""World""}), document.getElementById(""container""))" ,
77
77
result
78
78
) ;
79
79
}
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ public string RenderHtml()
72
72
try
73
73
{
74
74
var html = _environment . Execute < string > (
75
- string . Format ( "React.renderComponentToString ({0})" , GetComponentInitialiser ( ) )
75
+ string . Format ( "React.renderToString ({0})" , GetComponentInitialiser ( ) )
76
76
) ;
77
77
// TODO: Allow changing of the wrapper tag element from a DIV to something else
78
78
return string . Format (
@@ -101,7 +101,7 @@ public string RenderHtml()
101
101
public string RenderJavaScript ( )
102
102
{
103
103
return string . Format (
104
- "React.renderComponent ({0}, document.getElementById({1}))" ,
104
+ "React.render ({0}, document.getElementById({1}))" ,
105
105
GetComponentInitialiser ( ) ,
106
106
JsonConvert . SerializeObject ( _containerId )
107
107
) ;
You can’t perform that action at this time.
0 commit comments