public void TestValidateExtraInput() { Microsoft.SqlServer.Dts.Runtime.Package package = new Microsoft.SqlServer.Dts.Runtime.Package(); Executable exec = package.Executables.Add("STOCK:PipelineTask"); Microsoft.SqlServer.Dts.Runtime.TaskHost thMainPipe = exec as Microsoft.SqlServer.Dts.Runtime.TaskHost; MainPipe dataFlowTask = thMainPipe.InnerObject as MainPipe; ComponentEventHandler events = new ComponentEventHandler(); dataFlowTask.Events = DtsConvert.GetExtendedInterface(events as IDTSComponentEvents); IDTSComponentMetaData100 speechToText = dataFlowTask.ComponentMetaDataCollection.New(); speechToText.ComponentClassID = typeof(Martin.SQLServer.Dts.SSISSpeechToText).AssemblyQualifiedName; CManagedComponentWrapper speechToTextInstance = speechToText.Instantiate(); speechToTextInstance.ProvideComponentProperties(); speechToTextInstance.InsertInput(DTSInsertPlacement.IP_AFTER, speechToText.InputCollection[0].ID); DTSValidationStatus actual = speechToTextInstance.Validate(); DTSValidationStatus expected = DTSValidationStatus.VS_ISCORRUPT; Assert.AreEqual(expected, actual); Assert.AreEqual("[Error] SSIS Speech To Text: There is more than one input in the collection.", events.errorMessages[0]); }