public void HotReloadRegisterReplacedViewReplacesView() { var orgView = new MyOrgView(); var orgText = orgView.GetView() as Text; Assert.Equal(MyOrgView.TextValue, orgText.Value.CurrentValue); HotReloadHelper.RegisterReplacedView(typeof(MyOrgView).FullName, typeof(MyNewView)); var newText = orgView.GetView() as Text; Assert.Equal(MyNewView.TextValue, newText.Value.CurrentValue); }
public void StateIsTransferedToReloadedView() { ResetComet(); const string textValue = "Hello"; var orgView = new MyOrgView(); var orgText = orgView.GetView() as Text; Assert.NotEqual(orgView.bindingObject.Title, textValue); orgView.bindingObject.Title = textValue; Assert.Equal(textValue, orgText.Value); HotReloadHelper.RegisterReplacedView(typeof(MyOrgView).FullName, typeof(MyNewView)); var newText = orgView.GetView() as Text; Assert.Equal(textValue, newText.Value); }