public void AUT_Transaction_ReportProgress_Method_Call_Void_With_1_Parameters_Throw_Exception_Thrown_Test() { // Arrange var percentage = CreateType <decimal>(); var methodReportProgressPrametersTypes = new Type[] { typeof(decimal) }; object[] parametersOfReportProgress = { percentage }; Exception exception = null; var methodInfo = GetMethodInfo(MethodReportProgress, methodReportProgressPrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_transactionInstanceFixture, parametersOfReportProgress); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfReportProgress.ShouldNotBeNull(); parametersOfReportProgress.Length.ShouldBe(1); methodReportProgressPrametersTypes.Length.ShouldBe(1); methodReportProgressPrametersTypes.Length.ShouldBe(parametersOfReportProgress.Length); Should.Throw <Exception>(currentAction); }
public void AUT_ThrowingRecursionBehavior_Transform_Method_Call_With_No_Exception_Thrown_Test() { // Arrange this.ValidateExecuteCondition(MethodTransform); var builder = this.CreateType <ISpecimenBuilder>(); var methodTransformParametersTypes = new Type[] { typeof(ISpecimenBuilder) }; object[] parametersOfTransform = { builder }; Exception exception = null; var methodInfo = this.GetMethodInfo(MethodTransform, methodTransformParametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_throwingRecursionBehaviorInstanceFixture, parametersOfTransform); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfTransform.ShouldNotBeNull(); parametersOfTransform.Length.ShouldBe(1); methodTransformParametersTypes.Length.ShouldBe(1); Should.NotThrow(currentAction); }
public void AUT_DelegateGenerator_CreateMethodSpecimenParameters_Static_Method_Call_With_No_Exception_Thrown_Test() { // Arrange this.ValidateExecuteCondition(MethodCreateMethodSpecimenParameters); var request = this.CreateType <MethodInfo>(); var methodCreateMethodSpecimenParametersParametersTypes = new Type[] { typeof(MethodInfo) }; object[] parametersOfCreateMethodSpecimenParameters = { request }; Exception exception = null; var methodInfo = this.GetMethodInfo(MethodCreateMethodSpecimenParameters, methodCreateMethodSpecimenParametersParametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_delegateGeneratorInstanceFixture, parametersOfCreateMethodSpecimenParameters); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfCreateMethodSpecimenParameters.ShouldNotBeNull(); parametersOfCreateMethodSpecimenParameters.Length.ShouldBe(1); methodCreateMethodSpecimenParametersParametersTypes.Length.ShouldBe(1); Should.NotThrow(currentAction); }
public void AUT_Getresourcepool_getParams_Method_Call_Void_With_1_Parameters_No_Exception_Thrown_Test() { // Arrange var curWeb = CreateType <SPWeb>(); var methodgetParamsPrametersTypes = new Type[] { typeof(SPWeb) }; object[] parametersOfgetParams = { curWeb }; Exception exception = null; var methodInfo = GetMethodInfo(MethodgetParams, methodgetParamsPrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_getresourcepoolInstanceFixture, parametersOfgetParams); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfgetParams.ShouldNotBeNull(); parametersOfgetParams.Length.ShouldBe(1); methodgetParamsPrametersTypes.Length.ShouldBe(1); methodgetParamsPrametersTypes.Length.ShouldBe(parametersOfgetParams.Length); Should.NotThrow(currentAction); }
public void AUT_AndRequestSpecification_IsSatisfiedBy_Method_Call_With_No_Exception_Thrown_Test() { // Arrange this.ValidateExecuteCondition(MethodIsSatisfiedBy); var request = this.CreateType <object>(); var methodIsSatisfiedByParametersTypes = new Type[] { typeof(object) }; object[] parametersOfIsSatisfiedBy = { request }; Exception exception = null; var methodInfo = this.GetMethodInfo(MethodIsSatisfiedBy, methodIsSatisfiedByParametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_andRequestSpecificationInstanceFixture, parametersOfIsSatisfiedBy); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfIsSatisfiedBy.ShouldNotBeNull(); parametersOfIsSatisfiedBy.Length.ShouldBe(1); methodIsSatisfiedByParametersTypes.Length.ShouldBe(1); Should.NotThrow(currentAction); }
public void AUT_RegularExpressionRequest_Equals_Method_Call_With_No_Exception_Thrown_Test() { // Arrange this.ValidateExecuteCondition(MethodEquals); var obj = this.CreateType <object>(); var methodEqualsParametersTypes = new Type[] { typeof(object) }; object[] parametersOfEquals = { obj }; Exception exception = null; var methodInfo = this.GetMethodInfo(MethodEquals, methodEqualsParametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_regularExpressionRequestInstanceFixture, parametersOfEquals); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfEquals.ShouldNotBeNull(); parametersOfEquals.Length.ShouldBe(1); methodEqualsParametersTypes.Length.ShouldBe(1); Should.NotThrow(currentAction); }
public void AUT_GenericLinkProvider_ClearCache_Method_Call_Void_With_1_Parameters_Throw_Exception_Thrown_Test() { // Arrange var safeRemove = CreateType <bool>(); var methodClearCachePrametersTypes = new Type[] { typeof(bool) }; object[] parametersOfClearCache = { safeRemove }; Exception exception = null; var methodInfo = GetMethodInfo(MethodClearCache, methodClearCachePrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_genericLinkProviderInstanceFixture, parametersOfClearCache); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfClearCache.ShouldNotBeNull(); parametersOfClearCache.Length.ShouldBe(1); methodClearCachePrametersTypes.Length.ShouldBe(1); methodClearCachePrametersTypes.Length.ShouldBe(parametersOfClearCache.Length); Should.Throw <Exception>(currentAction); }
public void AUT_FilteredLookupField_OnAdded_Method_Call_Void_With_1_Parameters_Throw_Exception_Thrown_Test() { // Arrange var op = CreateType <SPAddFieldOptions>(); var methodOnAddedPrametersTypes = new Type[] { typeof(SPAddFieldOptions) }; object[] parametersOfOnAdded = { op }; Exception exception = null; var methodInfo = GetMethodInfo(MethodOnAdded, methodOnAddedPrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_filteredLookupFieldInstanceFixture, parametersOfOnAdded); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfOnAdded.ShouldNotBeNull(); parametersOfOnAdded.Length.ShouldBe(1); methodOnAddedPrametersTypes.Length.ShouldBe(1); methodOnAddedPrametersTypes.Length.ShouldBe(parametersOfOnAdded.Length); Should.Throw <Exception>(currentAction); }
public void AUT_GenericPublishEvent_ItemUpdating_Method_Call_Void_With_1_Parameters_Throw_Exception_Thrown_Test() { // Arrange var properties = CreateType <SPItemEventProperties>(); var methodItemUpdatingPrametersTypes = new Type[] { typeof(SPItemEventProperties) }; object[] parametersOfItemUpdating = { properties }; Exception exception = null; var methodInfo = GetMethodInfo(MethodItemUpdating, methodItemUpdatingPrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_genericPublishEventInstanceFixture, parametersOfItemUpdating); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfItemUpdating.ShouldNotBeNull(); parametersOfItemUpdating.Length.ShouldBe(1); methodItemUpdatingPrametersTypes.Length.ShouldBe(1); methodItemUpdatingPrametersTypes.Length.ShouldBe(parametersOfItemUpdating.Length); Should.Throw <Exception>(currentAction); }
public void AUT_TimeOffManager_Synchronize_Method_Call_Void_With_1_Parameters_Throw_Exception_Thrown_Test() { // Arrange var userId = CreateType <int>(); var methodSynchronizePrametersTypes = new Type[] { typeof(int) }; object[] parametersOfSynchronize = { userId }; Exception exception = null; var methodInfo = GetMethodInfo(MethodSynchronize, methodSynchronizePrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_timeOffManagerInstanceFixture, parametersOfSynchronize); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfSynchronize.ShouldNotBeNull(); parametersOfSynchronize.Length.ShouldBe(1); methodSynchronizePrametersTypes.Length.ShouldBe(1); methodSynchronizePrametersTypes.Length.ShouldBe(parametersOfSynchronize.Length); Should.Throw <Exception>(currentAction); }
public void AUT_TimeOffManager_ValidateGetTimeOffResponse_Method_Call_Void_With_1_Parameters_Throw_Exception_Thrown_Test() { // Arrange var resultElement = CreateType <XElement>(); var methodValidateGetTimeOffResponsePrametersTypes = new Type[] { typeof(XElement) }; object[] parametersOfValidateGetTimeOffResponse = { resultElement }; Exception exception = null; var methodInfo = GetMethodInfo(MethodValidateGetTimeOffResponse, methodValidateGetTimeOffResponsePrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_timeOffManagerInstanceFixture, parametersOfValidateGetTimeOffResponse); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfValidateGetTimeOffResponse.ShouldNotBeNull(); parametersOfValidateGetTimeOffResponse.Length.ShouldBe(1); methodValidateGetTimeOffResponsePrametersTypes.Length.ShouldBe(1); methodValidateGetTimeOffResponsePrametersTypes.Length.ShouldBe(parametersOfValidateGetTimeOffResponse.Length); Should.Throw <Exception>(currentAction); }
public void AUT_AssociatedItemsLinkProvider_GetAssociatedItems_Method_Call_Void_With_1_Parameters_Throw_Exception_Thrown_Test() { // Arrange var links = CreateType <List <NavLink> >(); var methodGetAssociatedItemsPrametersTypes = new Type[] { typeof(List <NavLink>) }; object[] parametersOfGetAssociatedItems = { links }; Exception exception = null; var methodInfo = GetMethodInfo(MethodGetAssociatedItems, methodGetAssociatedItemsPrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_associatedItemsLinkProviderInstanceFixture, parametersOfGetAssociatedItems); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfGetAssociatedItems.ShouldNotBeNull(); parametersOfGetAssociatedItems.Length.ShouldBe(1); methodGetAssociatedItemsPrametersTypes.Length.ShouldBe(1); methodGetAssociatedItemsPrametersTypes.Length.ShouldBe(parametersOfGetAssociatedItems.Length); Should.Throw <Exception>(currentAction); }
public void AUT_Gateway_ProcessActivity_Method_Call_With_No_Exception_Thrown_Test() { // Arrange var data = CreateType <string>(); var spWeb = CreateType <SPWeb>(); var methodProcessActivityPrametersTypes = new Type[] { typeof(string), typeof(SPWeb) }; object[] parametersOfProcessActivity = { data, spWeb }; Exception exception = null; var methodInfo = GetMethodInfo(MethodProcessActivity, methodProcessActivityPrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_gatewayInstanceFixture, parametersOfProcessActivity); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfProcessActivity.ShouldNotBeNull(); parametersOfProcessActivity.Length.ShouldBe(2); methodProcessActivityPrametersTypes.Length.ShouldBe(2); Should.NotThrow(currentAction); }
public void AUT_Msmq_Queue_Method_Call_Void_With_1_Parameters_Throw_Exception_Thrown_Test() { // Arrange var basePath = CreateType <string>(); var methodQueuePrametersTypes = new Type[] { typeof(string) }; object[] parametersOfQueue = { basePath }; Exception exception = null; var methodInfo = GetMethodInfo(MethodQueue, methodQueuePrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_msmqInstanceFixture, parametersOfQueue); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfQueue.ShouldNotBeNull(); parametersOfQueue.Length.ShouldBe(1); methodQueuePrametersTypes.Length.ShouldBe(1); methodQueuePrametersTypes.Length.ShouldBe(parametersOfQueue.Length); Should.Throw <Exception>(currentAction); }
public void AUT_Contextualslideout_HideSlideOut_Method_Call_Void_With_1_Parameters_No_Exception_Thrown_Test() { // Arrange var slideOutId = CreateType <string>(); var methodHideSlideOutPrametersTypes = new Type[] { typeof(string) }; object[] parametersOfHideSlideOut = { slideOutId }; Exception exception = null; var methodInfo = GetMethodInfo(MethodHideSlideOut, methodHideSlideOutPrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_contextualslideoutInstanceFixture, parametersOfHideSlideOut); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfHideSlideOut.ShouldNotBeNull(); parametersOfHideSlideOut.Length.ShouldBe(1); methodHideSlideOutPrametersTypes.Length.ShouldBe(1); methodHideSlideOutPrametersTypes.Length.ShouldBe(parametersOfHideSlideOut.Length); Should.NotThrow(currentAction); }
public void AUT_MyWork_OnPreLoad_Method_Call_Void_With_1_Parameters_Throw_Exception_Thrown_Test() { // Arrange var e = CreateType <EventArgs>(); var methodOnPreLoadPrametersTypes = new Type[] { typeof(EventArgs) }; object[] parametersOfOnPreLoad = { e }; Exception exception = null; var methodInfo = GetMethodInfo(MethodOnPreLoad, methodOnPreLoadPrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_myWorkInstanceFixture, parametersOfOnPreLoad); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfOnPreLoad.ShouldNotBeNull(); parametersOfOnPreLoad.Length.ShouldBe(1); methodOnPreLoadPrametersTypes.Length.ShouldBe(1); methodOnPreLoadPrametersTypes.Length.ShouldBe(parametersOfOnPreLoad.Length); Should.Throw <Exception>(currentAction); }
public void AUT_WorkEngineActivationInstaller_FeatureDeactivating_Method_Call_Void_With_1_Parameters_Throw_Exception_Thrown_Test() { // Arrange var properties = CreateType <SPFeatureReceiverProperties>(); var methodFeatureDeactivatingPrametersTypes = new Type[] { typeof(SPFeatureReceiverProperties) }; object[] parametersOfFeatureDeactivating = { properties }; Exception exception = null; var methodInfo = GetMethodInfo(MethodFeatureDeactivating, methodFeatureDeactivatingPrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_workEngineActivationInstallerInstanceFixture, parametersOfFeatureDeactivating); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfFeatureDeactivating.ShouldNotBeNull(); parametersOfFeatureDeactivating.Length.ShouldBe(1); methodFeatureDeactivatingPrametersTypes.Length.ShouldBe(1); methodFeatureDeactivatingPrametersTypes.Length.ShouldBe(parametersOfFeatureDeactivating.Length); Should.Throw <Exception>(currentAction); }
public void AUT_PFEResourcePermissionsFieldControl_RenderFieldForDisplay_Method_Call_Void_With_1_Parameters_No_Exception_Thrown_Test() { // Arrange var output = CreateType <HtmlTextWriter>(); var methodRenderFieldForDisplayPrametersTypes = new Type[] { typeof(HtmlTextWriter) }; object[] parametersOfRenderFieldForDisplay = { output }; Exception exception = null; var methodInfo = GetMethodInfo(MethodRenderFieldForDisplay, methodRenderFieldForDisplayPrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_pFEResourcePermissionsFieldControlInstanceFixture, parametersOfRenderFieldForDisplay); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfRenderFieldForDisplay.ShouldNotBeNull(); parametersOfRenderFieldForDisplay.Length.ShouldBe(1); methodRenderFieldForDisplayPrametersTypes.Length.ShouldBe(1); methodRenderFieldForDisplayPrametersTypes.Length.ShouldBe(parametersOfRenderFieldForDisplay.Length); Should.NotThrow(currentAction); }
public void AUT_GenericLinkProvider_Reorder_Method_Call_Void_With_1_Parameters_Throw_Exception_Thrown_Test() { // Arrange var data = CreateType <Dictionary <Guid, int> >(); var methodReorderPrametersTypes = new Type[] { typeof(Dictionary <Guid, int>) }; object[] parametersOfReorder = { data }; Exception exception = null; var methodInfo = GetMethodInfo(MethodReorder, methodReorderPrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_genericLinkProviderInstanceFixture, parametersOfReorder); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfReorder.ShouldNotBeNull(); parametersOfReorder.Length.ShouldBe(1); methodReorderPrametersTypes.Length.ShouldBe(1); methodReorderPrametersTypes.Length.ShouldBe(parametersOfReorder.Length); Should.Throw <Exception>(currentAction); }
public void AUT_Vb_Max_Static_Method_Call_With_No_Exception_Thrown_Test() { // Arrange var p0 = CreateType <int>(); var p1 = CreateType <int>(); var methodMaxPrametersTypes = new Type[] { typeof(int), typeof(int) }; object[] parametersOfMax = { p0, p1 }; Exception exception = null; var methodInfo = GetMethodInfo(MethodMax, methodMaxPrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_vbInstanceFixture, parametersOfMax); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfMax.ShouldNotBeNull(); parametersOfMax.Length.ShouldBe(2); methodMaxPrametersTypes.Length.ShouldBe(2); Should.NotThrow(currentAction); }
public void AUT_ListFavoringConstructorQuery_SelectMethods_Method_Call_With_No_Exception_Thrown_Test() { // Arrange this.ValidateExecuteCondition(MethodSelectMethods); var type = this.CreateType <Type>(); var methodSelectMethodsParametersTypes = new Type[] { typeof(Type) }; object[] parametersOfSelectMethods = { type }; Exception exception = null; var methodInfo = this.GetMethodInfo(MethodSelectMethods, methodSelectMethodsParametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_listFavoringConstructorQueryInstanceFixture, parametersOfSelectMethods); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfSelectMethods.ShouldNotBeNull(); parametersOfSelectMethods.Length.ShouldBe(1); methodSelectMethodsParametersTypes.Length.ShouldBe(1); Should.NotThrow(currentAction); }
public void AUT_Vb_Left_Static_Method_Call_With_No_Exception_Thrown_Test() { // Arrange var s = CreateType <string>(); var nLen = CreateType <int>(); var methodLeftPrametersTypes = new Type[] { typeof(string), typeof(int) }; object[] parametersOfLeft = { s, nLen }; Exception exception = null; var methodInfo = GetMethodInfo(MethodLeft, methodLeftPrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_vbInstanceFixture, parametersOfLeft); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfLeft.ShouldNotBeNull(); parametersOfLeft.Length.ShouldBe(2); methodLeftPrametersTypes.Length.ShouldBe(2); Should.NotThrow(currentAction); }
public void AUT_Notification_RaisePropertyChanged_Method_Call_Void_With_1_Parameters_No_Exception_Thrown_Test() { // Arrange var propertyName = CreateType <string>(); var methodRaisePropertyChangedPrametersTypes = new Type[] { typeof(string) }; object[] parametersOfRaisePropertyChanged = { propertyName }; Exception exception = null; var methodInfo = GetMethodInfo(MethodRaisePropertyChanged, methodRaisePropertyChangedPrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_notificationInstanceFixture, parametersOfRaisePropertyChanged); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfRaisePropertyChanged.ShouldNotBeNull(); parametersOfRaisePropertyChanged.Length.ShouldBe(1); methodRaisePropertyChangedPrametersTypes.Length.ShouldBe(1); methodRaisePropertyChangedPrametersTypes.Length.ShouldBe(parametersOfRaisePropertyChanged.Length); Should.NotThrow(currentAction); }
public void AUT_EditableFieldDisplay_WhereField_Static_Method_Call_With_Call_No_Exception_Thrown_With_Encapsulation_Test() { // Arrange var oConditionField = CreateType <SPField>(); var where = CreateType <string>(); var condition = CreateType <string>(); var value = CreateType <string>(); var li = CreateType <SPListItem>(); var methodWhereFieldPrametersTypes = new Type[] { typeof(SPField), typeof(string), typeof(string), typeof(string), typeof(SPListItem) }; object[] parametersOfWhereField = { oConditionField, where, condition, value, li }; // Act Action currentAction = () => ReflectionAnalyzer.GetResultOfStaticMethod <bool>(_editableFieldDisplayInstanceFixture, _editableFieldDisplayInstanceType, MethodWhereField, parametersOfWhereField, methodWhereFieldPrametersTypes); // Assert parametersOfWhereField.ShouldNotBeNull(); parametersOfWhereField.Length.ShouldBe(5); methodWhereFieldPrametersTypes.Length.ShouldBe(5); Should.NotThrow(currentAction); }
public void AUT_AssignedToEvent_ItemUpdated_Method_Call_Void_With_1_Parameters_No_Exception_Thrown_Test() { // Arrange var properties = CreateType <SPItemEventProperties>(); var methodItemUpdatedPrametersTypes = new Type[] { typeof(SPItemEventProperties) }; object[] parametersOfItemUpdated = { properties }; Exception exception = null; var methodInfo = GetMethodInfo(MethodItemUpdated, methodItemUpdatedPrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_assignedToEventInstanceFixture, parametersOfItemUpdated); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfItemUpdated.ShouldNotBeNull(); parametersOfItemUpdated.Length.ShouldBe(1); methodItemUpdatedPrametersTypes.Length.ShouldBe(1); methodItemUpdatedPrametersTypes.Length.ShouldBe(parametersOfItemUpdated.Length); Should.NotThrow(currentAction); }
public void AUT_EditableFieldDisplay_getFieldSchemaAttribValue_Static_Method_Call_With_No_Exception_Thrown_Test() { // Arrange var sStringToSearch = CreateType <string>(); var sAttribName = CreateType <string>(); var methodgetFieldSchemaAttribValuePrametersTypes = new Type[] { typeof(string), typeof(string) }; object[] parametersOfgetFieldSchemaAttribValue = { sStringToSearch, sAttribName }; Exception exception = null; var methodInfo = GetMethodInfo(MethodgetFieldSchemaAttribValue, methodgetFieldSchemaAttribValuePrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_editableFieldDisplayInstanceFixture, parametersOfgetFieldSchemaAttribValue); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfgetFieldSchemaAttribValue.ShouldNotBeNull(); parametersOfgetFieldSchemaAttribValue.Length.ShouldBe(2); methodgetFieldSchemaAttribValuePrametersTypes.Length.ShouldBe(2); Should.NotThrow(currentAction); }
public void AUT_BuyNow_Render_Method_Call_Void_With_1_Parameters_Throw_Exception_Thrown_Test() { // Arrange var writer = CreateType <HtmlTextWriter>(); var methodRenderPrametersTypes = new Type[] { typeof(HtmlTextWriter) }; object[] parametersOfRender = { writer }; Exception exception = null; var methodInfo = GetMethodInfo(MethodRender, methodRenderPrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_buyNowInstanceFixture, parametersOfRender); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfRender.ShouldNotBeNull(); parametersOfRender.Length.ShouldBe(1); methodRenderPrametersTypes.Length.ShouldBe(1); methodRenderPrametersTypes.Length.ShouldBe(parametersOfRender.Length); Should.Throw <Exception>(currentAction); }
public void AUT_Refreshpc_processWeb_Method_Call_Void_With_1_Parameters_Throw_Exception_Thrown_Test() { // Arrange var web = CreateType <SPWeb>(); var methodprocessWebPrametersTypes = new Type[] { typeof(SPWeb) }; object[] parametersOfprocessWeb = { web }; Exception exception = null; var methodInfo = GetMethodInfo(MethodprocessWeb, methodprocessWebPrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_refreshpcInstanceFixture, parametersOfprocessWeb); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfprocessWeb.ShouldNotBeNull(); parametersOfprocessWeb.Length.ShouldBe(1); methodprocessWebPrametersTypes.Length.ShouldBe(1); methodprocessWebPrametersTypes.Length.ShouldBe(parametersOfprocessWeb.Length); Should.Throw <Exception>(currentAction); }
public void AUT_OmitSpecimen_Equals_Method_Call_Overloading_Of_1_With_No_Exception_Thrown_Test() { // Arrange this.ValidateExecuteCondition(MethodEquals); var other = this.CreateType <OmitSpecimen>(); var methodEqualsParametersTypes = new Type[] { typeof(OmitSpecimen) }; object[] parametersOfEquals = { other }; Exception exception = null; var methodInfo = this.GetMethodInfo(MethodEquals, methodEqualsParametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_omitSpecimenInstanceFixture, parametersOfEquals); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfEquals.ShouldNotBeNull(); parametersOfEquals.Length.ShouldBe(1); methodEqualsParametersTypes.Length.ShouldBe(1); Should.NotThrow(currentAction); }
public void AUT_Transaction_Complete_Method_Call_Void_With_1_Parameters_Throw_Exception_Thrown_Test() { // Arrange var data = CreateType <object>(); var methodCompletePrametersTypes = new Type[] { typeof(object) }; object[] parametersOfComplete = { data }; Exception exception = null; var methodInfo = GetMethodInfo(MethodComplete, methodCompletePrametersTypes, out exception); // Act Action currentAction = () => methodInfo.Invoke(_transactionInstanceFixture, parametersOfComplete); // Assert methodInfo.ShouldNotBeNull(); exception.ShouldBeNull(); parametersOfComplete.ShouldNotBeNull(); parametersOfComplete.Length.ShouldBe(1); methodCompletePrametersTypes.Length.ShouldBe(1); methodCompletePrametersTypes.Length.ShouldBe(parametersOfComplete.Length); Should.Throw <Exception>(currentAction); }