public void PluginProcessTaskUI_InvalidParameter_Date() { MEF.AddTypeToCatalogForTesting(typeof(OmgDates)); var pt = WhenIHaveA <ProcessTask>(); pt.Path = typeof(OmgDates).FullName; var arg = pt.CreateArgumentsForClassIfNotExists <OmgDates>().Single(); //set the argument value to 2001 arg.SetValue(new DateTime(2001, 01, 01)); pt.SaveToDatabase(); AndLaunch <PluginProcessTaskUI>(pt); AssertNoErrors(ExpectedErrorType.Any); //there should be a text box with our argumetn value in it var tb = GetControl <TextBox>().Single(t => t.Text.Contains("2001")); //set the text to something nasty that won't compile tb.Text = "hahahah fff"; Publish(pt); AssertNoErrors(ExpectedErrorType.Any); AndLaunch <PluginProcessTaskUI>(pt); AssertNoErrors(ExpectedErrorType.Any); }