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()
4141 } ;
4242 component . RenderHtml ( ) ;
4343
44- environment . Verify ( x => x . Execute < string > ( @"React.renderComponentToString (Foo({""hello"":""World""}))" ) ) ;
44+ environment . Verify ( x => x . Execute < string > ( @"React.renderToString (Foo({""hello"":""World""}))" ) ) ;
4545 }
4646
4747 [ Test ]
4848 public void RenderHtmlShouldWrapComponentInDiv ( )
4949 {
5050 var environment = new Mock < IReactEnvironment > ( ) ;
5151 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""}))" ) )
5353 . Returns ( "[HTML]" ) ;
5454
5555 var component = new ReactComponent ( environment . Object , "Foo" , "container" )
@@ -73,7 +73,7 @@ public void RenderJavaScriptShouldCallRenderComponent()
7373 var result = component . RenderJavaScript ( ) ;
7474
7575 Assert . AreEqual (
76- @"React.renderComponent (Foo({""hello"":""World""}), document.getElementById(""container""))" ,
76+ @"React.render (Foo({""hello"":""World""}), document.getElementById(""container""))" ,
7777 result
7878 ) ;
7979 }
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ public string RenderHtml()
7272 try
7373 {
7474 var html = _environment . Execute < string > (
75- string . Format ( "React.renderComponentToString ({0})" , GetComponentInitialiser ( ) )
75+ string . Format ( "React.renderToString ({0})" , GetComponentInitialiser ( ) )
7676 ) ;
7777 // TODO: Allow changing of the wrapper tag element from a DIV to something else
7878 return string . Format (
@@ -101,7 +101,7 @@ public string RenderHtml()
101101 public string RenderJavaScript ( )
102102 {
103103 return string . Format (
104- "React.renderComponent ({0}, document.getElementById({1}))" ,
104+ "React.render ({0}, document.getElementById({1}))" ,
105105 GetComponentInitialiser ( ) ,
106106 JsonConvert . SerializeObject ( _containerId )
107107 ) ;
You can’t perform that action at this time.
0 commit comments