public void ModelEditorPropertyEditor_Control_Will_Be_A_ModelEditorControl(){ var editor = new ModelEditorPropertyEditor(null, null); // Isolate.WhenCalled(() => editor.GetModel()).ReturnRecursiveFake(); Isolate.WhenCalled(() => editor.GetModelEditorController(Isolate.Fake.Instance<XafApplication>())).ReturnRecursiveFake(); editor.Setup(Isolate.Fake.Instance<ObjectSpace>(), Isolate.Fake.Instance<XafApplication>()); Isolate.Swap.NextInstance<ModelEditorControl>().With(Isolate.Fake.Instance<ModelEditorControl>()); editor.CreateControl(); Assert.IsInstanceOfType(typeof(ModelEditorControl), editor.Control); }