Ejemplo n.º 1
0
        public void AUT_PlannerCore_getWorkPlannerStatusFields_Static_Method_Call_With_No_Exception_Thrown_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodgetWorkPlannerStatusFields);
            var w    = this.CreateType <SPWeb>();
            var list = this.CreateType <string>();
            var methodgetWorkPlannerStatusFieldsPrametersTypes = new Type[] { typeof(SPWeb), typeof(string) };

            object[]  parametersOfgetWorkPlannerStatusFields = { w, list };
            Exception exception  = null;
            var       methodInfo = this.GetMethodInfo(MethodgetWorkPlannerStatusFields, methodgetWorkPlannerStatusFieldsPrametersTypes, out exception);

            // Act
            Action currentAction = () => methodInfo.Invoke(_plannerCoreInstanceFixture, parametersOfgetWorkPlannerStatusFields);

            // Assert
            methodInfo.ShouldNotBeNull();
            exception.ShouldBeNull();
            parametersOfgetWorkPlannerStatusFields.ShouldNotBeNull();
            parametersOfgetWorkPlannerStatusFields.Length.ShouldBe(2);
            methodgetWorkPlannerStatusFieldsPrametersTypes.Length.ShouldBe(2);
            Should.NotThrow(currentAction);
        }
        public void AUT_EPMLiveLoggingEventReceiver_DeRegisterKey_Method_Call_Void_With_2_Parameters_No_Exception_Thrown_Test()
        {
            // Arrange
            var baseKey = CreateType <RegistryKey>();
            var key     = CreateType <string>();
            var methodDeRegisterKeyPrametersTypes = new Type[] { typeof(RegistryKey), typeof(string) };

            object[]  parametersOfDeRegisterKey = { baseKey, key };
            Exception exception  = null;
            var       methodInfo = GetMethodInfo(MethodDeRegisterKey, methodDeRegisterKeyPrametersTypes, out exception);

            // Act
            Action currentAction = () => methodInfo.Invoke(_ePMLiveLoggingEventReceiverInstanceFixture, parametersOfDeRegisterKey);

            // Assert
            methodInfo.ShouldNotBeNull();
            exception.ShouldBeNull();
            parametersOfDeRegisterKey.ShouldNotBeNull();
            parametersOfDeRegisterKey.Length.ShouldBe(2);
            methodDeRegisterKeyPrametersTypes.Length.ShouldBe(2);
            methodDeRegisterKeyPrametersTypes.Length.ShouldBe(parametersOfDeRegisterKey.Length);
            Should.NotThrow(currentAction);
        }
        public void AUT_HolidayDescription_RaisePropertyChanged_Method_Call_Void_With_No_Parameters_No_Exception_Thrown_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodRaisePropertyChanged);
            var propertyName = this.CreateType <string>();
            var methodRaisePropertyChangedPrametersTypes = new Type[] { typeof(string) };

            object[]  parametersOfRaisePropertyChanged = { propertyName };
            Exception exception  = null;
            var       methodInfo = this.GetMethodInfo(MethodRaisePropertyChanged, methodRaisePropertyChangedPrametersTypes, out exception);

            // Act
            Action currentAction = () => methodInfo.Invoke(_holidayDescriptionInstanceFixture, parametersOfRaisePropertyChanged);

            // Assert
            methodInfo.ShouldNotBeNull();
            exception.ShouldBeNull();
            parametersOfRaisePropertyChanged.ShouldNotBeNull();
            parametersOfRaisePropertyChanged.Length.ShouldBe(1);
            methodRaisePropertyChangedPrametersTypes.Length.ShouldBe(1);
            methodRaisePropertyChangedPrametersTypes.Length.ShouldBe(parametersOfRaisePropertyChanged.Length);
            Should.NotThrow(currentAction);
        }
Ejemplo n.º 4
0
        public void AUT_Adminqueue_WebApplicationSelector1_ContextChange_Method_Call_Void_With_2_Parameters_No_Exception_Thrown_Test()
        {
            // Arrange
            var sender = CreateType <object>();
            var e      = CreateType <EventArgs>();
            var methodWebApplicationSelector1_ContextChangePrametersTypes = new Type[] { typeof(object), typeof(EventArgs) };

            object[]  parametersOfWebApplicationSelector1_ContextChange = { sender, e };
            Exception exception  = null;
            var       methodInfo = GetMethodInfo(MethodWebApplicationSelector1_ContextChange, methodWebApplicationSelector1_ContextChangePrametersTypes, out exception);

            // Act
            Action currentAction = () => methodInfo.Invoke(_adminqueueInstanceFixture, parametersOfWebApplicationSelector1_ContextChange);

            // Assert
            methodInfo.ShouldNotBeNull();
            exception.ShouldBeNull();
            parametersOfWebApplicationSelector1_ContextChange.ShouldNotBeNull();
            parametersOfWebApplicationSelector1_ContextChange.Length.ShouldBe(2);
            methodWebApplicationSelector1_ContextChangePrametersTypes.Length.ShouldBe(2);
            methodWebApplicationSelector1_ContextChangePrametersTypes.Length.ShouldBe(parametersOfWebApplicationSelector1_ContextChange.Length);
            Should.NotThrow(currentAction);
        }
Ejemplo n.º 5
0
        public void AUT_ListRelay_Create_Method_Call_With_No_Exception_Thrown_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodCreate);
            var request = this.CreateType <object>();
            var context = this.CreateType <ISpecimenContext>();
            var methodCreateParametersTypes = new Type[] { typeof(object), typeof(ISpecimenContext) };

            object[]  parametersOfCreate = { request, context };
            Exception exception          = null;
            var       methodInfo         = this.GetMethodInfo(MethodCreate, methodCreateParametersTypes, out exception);

            // Act
            Action currentAction = () => methodInfo.Invoke(_listRelayInstanceFixture, parametersOfCreate);

            // Assert
            methodInfo.ShouldNotBeNull();
            exception.ShouldBeNull();
            parametersOfCreate.ShouldNotBeNull();
            parametersOfCreate.Length.ShouldBe(2);
            methodCreateParametersTypes.Length.ShouldBe(2);
            Should.NotThrow(currentAction);
        }
        public void AUT_AttachFileMulti_Page_Load_Method_Call_Void_With_2_Parameters_No_Exception_Thrown_Test()
        {
            // Arrange
            var sender = CreateType <object>();
            var e      = CreateType <EventArgs>();
            var methodPage_LoadPrametersTypes = new Type[] { typeof(object), typeof(EventArgs) };

            object[]  parametersOfPage_Load = { sender, e };
            Exception exception             = null;
            var       methodInfo            = GetMethodInfo(MethodPage_Load, methodPage_LoadPrametersTypes, out exception);

            // Act
            Action currentAction = () => methodInfo.Invoke(_attachFileMultiInstanceFixture, parametersOfPage_Load);

            // Assert
            methodInfo.ShouldNotBeNull();
            exception.ShouldBeNull();
            parametersOfPage_Load.ShouldNotBeNull();
            parametersOfPage_Load.Length.ShouldBe(2);
            methodPage_LoadPrametersTypes.Length.ShouldBe(2);
            methodPage_LoadPrametersTypes.Length.ShouldBe(parametersOfPage_Load.Length);
            Should.NotThrow(currentAction);
        }
Ejemplo n.º 7
0
        public void AUT_Getworkspacexml_addWebs_Method_Call_Void_With_2_Parameters_No_Exception_Thrown_Test()
        {
            // Arrange
            var web        = CreateType <SPWeb>();
            var parentNode = CreateType <XmlNode>();
            var methodaddWebsPrametersTypes = new Type[] { typeof(SPWeb), typeof(XmlNode) };

            object[]  parametersOfaddWebs = { web, parentNode };
            Exception exception           = null;
            var       methodInfo          = GetMethodInfo(MethodAddWebs, methodaddWebsPrametersTypes, out exception);

            // Act
            Action currentAction = () => methodInfo.Invoke(_getworkspacexmlInstanceFixture, parametersOfaddWebs);

            // Assert
            methodInfo.ShouldNotBeNull();
            exception.ShouldBeNull();
            parametersOfaddWebs.ShouldNotBeNull();
            parametersOfaddWebs.Length.ShouldBe(2);
            methodaddWebsPrametersTypes.Length.ShouldBe(2);
            methodaddWebsPrametersTypes.Length.ShouldBe(parametersOfaddWebs.Length);
            Should.NotThrow(currentAction);
        }
Ejemplo n.º 8
0
        public void AUT_SPViewLog_ExecuteProcess_Static_Method_Call_With_No_Exception_Thrown_Test()
        {
            // Arrange
            var sContext    = CreateType <string>();
            var sXMLRequest = CreateType <string>();
            var xNode       = CreateType <XmlNode>();
            var methodExecuteProcessPrametersTypes = new Type[] { typeof(string), typeof(string), typeof(XmlNode) };

            object[]  parametersOfExecuteProcess = { sContext, sXMLRequest, xNode };
            Exception exception  = null;
            var       methodInfo = GetMethodInfo(MethodExecuteProcess, methodExecuteProcessPrametersTypes, out exception);

            // Act
            Action currentAction = () => methodInfo.Invoke(_sPViewLogInstanceFixture, parametersOfExecuteProcess);

            // Assert
            methodInfo.ShouldNotBeNull();
            exception.ShouldBeNull();
            parametersOfExecuteProcess.ShouldNotBeNull();
            parametersOfExecuteProcess.Length.ShouldBe(3);
            methodExecuteProcessPrametersTypes.Length.ShouldBe(3);
            Should.NotThrow(currentAction);
        }
        public void AUT_CompositeCustomization_Customize_Method_Call_Void_With_No_Parameters_No_Exception_Thrown_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodCustomize);
            var fixture = this.CreateType <IFixture>();
            var methodCustomizeParametersTypes = new Type[] { typeof(IFixture) };

            object[]  parametersOfCustomize = { fixture };
            Exception exception             = null;
            var       methodInfo            = this.GetMethodInfo(MethodCustomize, methodCustomizeParametersTypes, out exception);

            // Act
            Action currentAction = () => methodInfo.Invoke(_compositeCustomizationInstanceFixture, parametersOfCustomize);

            // Assert
            methodInfo.ShouldNotBeNull();
            exception.ShouldBeNull();
            parametersOfCustomize.ShouldNotBeNull();
            parametersOfCustomize.Length.ShouldBe(1);
            methodCustomizeParametersTypes.Length.ShouldBe(1);
            methodCustomizeParametersTypes.Length.ShouldBe(parametersOfCustomize.Length);
            Should.NotThrow(currentAction);
        }
Ejemplo n.º 10
0
        public void AUT_EPKClass01_GetTableAndField_Static_Method_Call_With_No_Exception_Thrown_Test()
        {
            // Arrange
            var iTable = CreateType <int>();
            var iField = CreateType <int>();
            var sTable = CreateType <string>();
            var sField = CreateType <string>();
            var methodGetTableAndFieldPrametersTypes = new Type[] { typeof(int), typeof(int), typeof(string), typeof(string) };

            object[]  parametersOfGetTableAndField = { iTable, iField, sTable, sField };
            Exception exception  = null;
            var       methodInfo = GetMethodInfo(MethodGetTableAndField, methodGetTableAndFieldPrametersTypes, out exception);

            // Act
            Action currentAction = () => methodInfo.Invoke(_ePKClass01InstanceFixture, parametersOfGetTableAndField);

            // Assert
            methodInfo.ShouldNotBeNull();
            exception.ShouldBeNull();
            parametersOfGetTableAndField.ShouldNotBeNull();
            parametersOfGetTableAndField.Length.ShouldBe(4);
            methodGetTableAndFieldPrametersTypes.Length.ShouldBe(4);
            Should.NotThrow(currentAction);
        }
Ejemplo n.º 11
0
        public void AUT_ViewManager_RenameView_Method_Call_Void_With_3_Parameters_No_Exception_Thrown_Test()
        {
            // Arrange
            var view        = CreateType <string>();
            var newname     = CreateType <string>();
            var defaultView = CreateType <string>();
            var methodRenameViewPrametersTypes = new Type[] { typeof(string), typeof(string), typeof(string) };

            object[]  parametersOfRenameView = { view, newname, defaultView };
            Exception exception  = null;
            var       methodInfo = GetMethodInfo(MethodRenameView, methodRenameViewPrametersTypes, out exception);

            // Act
            Action currentAction = () => methodInfo.Invoke(_viewManagerInstanceFixture, parametersOfRenameView);

            // Assert
            methodInfo.ShouldNotBeNull();
            exception.ShouldBeNull();
            parametersOfRenameView.ShouldNotBeNull();
            parametersOfRenameView.Length.ShouldBe(3);
            methodRenameViewPrametersTypes.Length.ShouldBe(3);
            methodRenameViewPrametersTypes.Length.ShouldBe(parametersOfRenameView.Length);
            Should.NotThrow(currentAction);
        }
Ejemplo n.º 12
0
        public void AUT_ListImportJob_ImportTasksFromListTasks_Method_Call_Void_With_6_Parameters_No_Exception_Thrown_With_Encapsulation_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodImportTasksFromListTasks);
            var lic                 = this.CreateType <SPListItemCollection>();
            var docNew              = this.CreateType <XmlDocument>();
            var hshMapping          = this.CreateType <Hashtable>();
            var dsResources         = this.CreateType <DataSet>();
            var bMatchingTaskCenter = this.CreateType <bool>();
            var docPlan             = this.CreateType <XmlDocument>();
            var methodImportTasksFromListTasksPrametersTypes = new Type[] { typeof(SPListItemCollection), typeof(XmlDocument), typeof(Hashtable), typeof(DataSet), typeof(bool), typeof(XmlDocument) };

            object[] parametersOfImportTasksFromListTasks = { lic, docNew, hshMapping, dsResources, bMatchingTaskCenter, docPlan };

            // Act
            Action currentAction = () => ReflectionAnalyzer.InvokeVoidMethod(_listImportJobInstance, MethodImportTasksFromListTasks, parametersOfImportTasksFromListTasks, methodImportTasksFromListTasksPrametersTypes);

            // Assert
            parametersOfImportTasksFromListTasks.ShouldNotBeNull();
            parametersOfImportTasksFromListTasks.Length.ShouldBe(6);
            methodImportTasksFromListTasksPrametersTypes.Length.ShouldBe(6);
            methodImportTasksFromListTasksPrametersTypes.Length.ShouldBe(parametersOfImportTasksFromListTasks.Length);
            Should.NotThrow(currentAction);
        }
        public void AUT_EditableFieldDisplay_RenderField_Static_Method_Call_With_Call_No_Exception_Thrown_With_Encapsulation_Test()
        {
            // Arrange
            var field = CreateType <SPField>();

            var where = CreateType <string>();
            var conditionField = CreateType <string>();
            var condition      = CreateType <string>();
            var group          = CreateType <string>();
            var valueCondition = CreateType <string>();
            var li             = CreateType <SPListItem>();
            var methodRenderFieldPrametersTypes = new Type[] { typeof(SPField), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(SPListItem) };

            object[] parametersOfRenderField = { field, where, conditionField, condition, group, valueCondition, li };

            // Act
            Action currentAction = () => ReflectionAnalyzer.GetResultOfStaticMethod <bool>(_editableFieldDisplayInstanceFixture, _editableFieldDisplayInstanceType, MethodRenderField, parametersOfRenderField, methodRenderFieldPrametersTypes);

            // Assert
            parametersOfRenderField.ShouldNotBeNull();
            parametersOfRenderField.Length.ShouldBe(7);
            methodRenderFieldPrametersTypes.Length.ShouldBe(7);
            Should.NotThrow(currentAction);
        }
Ejemplo n.º 14
0
        public void AUT_Edititem_ListFormWebPart1_Init_Method_Call_Void_With_No_Parameters_No_Exception_Thrown_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodListFormWebPart1_Init);
            var sender = this.CreateType <object>();
            var e      = this.CreateType <EventArgs>();
            var methodListFormWebPart1_InitPrametersTypes = new Type[] { typeof(object), typeof(EventArgs) };

            object[]  parametersOfListFormWebPart1_Init = { sender, e };
            Exception exception  = null;
            var       methodInfo = this.GetMethodInfo(MethodListFormWebPart1_Init, methodListFormWebPart1_InitPrametersTypes, out exception);

            // Act
            Action currentAction = () => methodInfo.Invoke(_edititemInstanceFixture, parametersOfListFormWebPart1_Init);

            // Assert
            methodInfo.ShouldNotBeNull();
            exception.ShouldBeNull();
            parametersOfListFormWebPart1_Init.ShouldNotBeNull();
            parametersOfListFormWebPart1_Init.Length.ShouldBe(2);
            methodListFormWebPart1_InitPrametersTypes.Length.ShouldBe(2);
            methodListFormWebPart1_InitPrametersTypes.Length.ShouldBe(parametersOfListFormWebPart1_Init.Length);
            Should.NotThrow(currentAction);
        }
Ejemplo n.º 15
0
        public void AUT_Proxy_outputData_Method_Call_Void_With_3_Parameters_No_Exception_Thrown_Test()
        {
            // Arrange
            var status  = CreateType <string>();
            var message = CreateType <string>();
            var percent = CreateType <string>();
            var methodoutputDataPrametersTypes = new Type[] { typeof(string), typeof(string), typeof(string) };

            object[]  parametersOfoutputData = { status, message, percent };
            Exception exception  = null;
            var       methodInfo = GetMethodInfo(MethodoutputData, methodoutputDataPrametersTypes, out exception);

            // Act
            Action currentAction = () => methodInfo.Invoke(_proxyInstanceFixture, parametersOfoutputData);

            // Assert
            methodInfo.ShouldNotBeNull();
            exception.ShouldBeNull();
            parametersOfoutputData.ShouldNotBeNull();
            parametersOfoutputData.Length.ShouldBe(3);
            methodoutputDataPrametersTypes.Length.ShouldBe(3);
            methodoutputDataPrametersTypes.Length.ShouldBe(parametersOfoutputData.Length);
            Should.NotThrow(currentAction);
        }
        public void AUT_VfChartSeries_AddItem_Method_Call_Void_With_3_Parameters_No_Exception_Thrown_Test()
        {
            // Arrange
            var xAxisLabel = CreateType <string>();
            var yValue     = CreateType <double>();
            var zValue     = CreateType <double>();
            var methodAddItemPrametersTypes = new Type[] { typeof(string), typeof(double), typeof(double) };

            object[]  parametersOfAddItem = { xAxisLabel, yValue, zValue };
            Exception exception           = null;
            var       methodInfo          = GetMethodInfo(MethodAddItem, methodAddItemPrametersTypes, out exception);

            // Act
            Action currentAction = () => methodInfo.Invoke(_vfChartSeriesInstanceFixture, parametersOfAddItem);

            // Assert
            methodInfo.ShouldNotBeNull();
            exception.ShouldBeNull();
            parametersOfAddItem.ShouldNotBeNull();
            parametersOfAddItem.Length.ShouldBe(3);
            methodAddItemPrametersTypes.Length.ShouldBe(3);
            methodAddItemPrametersTypes.Length.ShouldBe(parametersOfAddItem.Length);
            Should.NotThrow(currentAction);
        }
Ejemplo n.º 17
0
        public void AUT_SelectDate_Page_Load_Method_Call_Void_With_No_Parameters_No_Exception_Thrown_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodPage_Load);
            var sender = this.CreateType <object>();
            var e      = this.CreateType <EventArgs>();
            var methodPage_LoadPrametersTypes = new Type[] { typeof(object), typeof(EventArgs) };

            object[]  parametersOfPage_Load = { sender, e };
            Exception exception             = null;
            var       methodInfo            = this.GetMethodInfo(MethodPage_Load, methodPage_LoadPrametersTypes, out exception);

            // Act
            Action currentAction = () => methodInfo.Invoke(_selectDateInstanceFixture, parametersOfPage_Load);

            // Assert
            methodInfo.ShouldNotBeNull();
            exception.ShouldBeNull();
            parametersOfPage_Load.ShouldNotBeNull();
            parametersOfPage_Load.Length.ShouldBe(2);
            methodPage_LoadPrametersTypes.Length.ShouldBe(2);
            methodPage_LoadPrametersTypes.Length.ShouldBe(parametersOfPage_Load.Length);
            Should.NotThrow(currentAction);
        }
        public void AUT_ConstrainedStringGenerator_Create_Static_Method_Call_Overloading_Of_1_With_No_Exception_Thrown_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodCreate);
            var minimumLength = this.CreateType <int>();
            var maximumLength = this.CreateType <int>();
            var context       = this.CreateType <ISpecimenContext>();
            var methodCreateParametersTypes = new Type[] { typeof(int), typeof(int), typeof(ISpecimenContext) };

            object[]  parametersOfCreate = { minimumLength, maximumLength, context };
            Exception exception          = null;
            var       methodInfo         = this.GetMethodInfo(MethodCreate, methodCreateParametersTypes, out exception);

            // Act
            Action currentAction = () => methodInfo.Invoke(_constrainedStringGeneratorInstanceFixture, parametersOfCreate);

            // Assert
            methodInfo.ShouldNotBeNull();
            exception.ShouldBeNull();
            parametersOfCreate.ShouldNotBeNull();
            parametersOfCreate.Length.ShouldBe(3);
            methodCreateParametersTypes.Length.ShouldBe(3);
            Should.NotThrow(currentAction);
        }
Ejemplo n.º 19
0
        public void AUT_LoggingService_WriteEvent_Static_Method_Call_Void_Overloading_Of_1_With_4_Parameters_No_Exception_Thrown_Test()
        {
            // Arrange
            var areaName      = CreateType <string>();
            var categoryName  = CreateType <string>();
            var eventSeverity = CreateType <EventSeverity>();
            var message       = CreateType <string>();
            var methodWriteEventPrametersTypes = new Type[] { typeof(string), typeof(string), typeof(EventSeverity), typeof(string) };

            object[]  parametersOfWriteEvent = { areaName, categoryName, eventSeverity, message };
            Exception exception  = null;
            var       methodInfo = GetMethodInfo(MethodWriteEvent, methodWriteEventPrametersTypes, out exception);

            // Act
            Action currentAction = () => methodInfo.Invoke(_loggingServiceInstanceFixture, parametersOfWriteEvent);

            // Assert
            methodInfo.ShouldNotBeNull();
            exception.ShouldBeNull();
            parametersOfWriteEvent.ShouldNotBeNull();
            parametersOfWriteEvent.Length.ShouldBe(4);
            methodWriteEventPrametersTypes.Length.ShouldBe(4);
            Should.NotThrow(currentAction);
        }
Ejemplo n.º 20
0
        public void AUT_Refreshpc_getListItemCount_Method_Call_With_No_Exception_Thrown_Test()
        {
            // Arrange
            var web     = CreateType <SPWeb>();
            var list    = CreateType <string>();
            var query   = CreateType <string>();
            var project = CreateType <string>();
            var methodgetListItemCountPrametersTypes = new Type[] { typeof(SPWeb), typeof(string), typeof(string), typeof(string) };

            object[]  parametersOfgetListItemCount = { web, list, query, project };
            Exception exception  = null;
            var       methodInfo = GetMethodInfo(MethodgetListItemCount, methodgetListItemCountPrametersTypes, out exception);

            // Act
            Action currentAction = () => methodInfo.Invoke(_refreshpcInstanceFixture, parametersOfgetListItemCount);

            // Assert
            methodInfo.ShouldNotBeNull();
            exception.ShouldBeNull();
            parametersOfgetListItemCount.ShouldNotBeNull();
            parametersOfgetListItemCount.Length.ShouldBe(4);
            methodgetListItemCountPrametersTypes.Length.ShouldBe(4);
            Should.NotThrow(currentAction);
        }
Ejemplo n.º 21
0
        public void AUT_Savegrid_populateGroups_Method_Call_Void_With_3_Parameters_No_Exception_Thrown_Test()
        {
            // Arrange
            var query    = CreateType <string>();
            var arrGTemp = CreateType <SortedList>();
            var curWeb   = CreateType <SPWeb>();
            var methodpopulateGroupsPrametersTypes = new Type[] { typeof(string), typeof(SortedList), typeof(SPWeb) };

            object[]  parametersOfpopulateGroups = { query, arrGTemp, curWeb };
            Exception exception  = null;
            var       methodInfo = GetMethodInfo(MethodpopulateGroups, methodpopulateGroupsPrametersTypes, out exception);

            // Act
            Action currentAction = () => methodInfo.Invoke(_savegridInstanceFixture, parametersOfpopulateGroups);

            // Assert
            methodInfo.ShouldNotBeNull();
            exception.ShouldBeNull();
            parametersOfpopulateGroups.ShouldNotBeNull();
            parametersOfpopulateGroups.Length.ShouldBe(3);
            methodpopulateGroupsPrametersTypes.Length.ShouldBe(3);
            methodpopulateGroupsPrametersTypes.Length.ShouldBe(parametersOfpopulateGroups.Length);
            Should.NotThrow(currentAction);
        }
Ejemplo n.º 22
0
        public void AUT_ListImportJob_getFieldValue_Method_Call_With_No_Exception_Thrown_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodgetFieldValue);
            var li          = this.CreateType <SPListItem>();
            var oField      = this.CreateType <SPField>();
            var dsResources = this.CreateType <DataSet>();
            var methodgetFieldValuePrametersTypes = new Type[] { typeof(SPListItem), typeof(SPField), typeof(DataSet) };

            object[]  parametersOfgetFieldValue = { li, oField, dsResources };
            Exception exception  = null;
            var       methodInfo = this.GetMethodInfo(MethodgetFieldValue, methodgetFieldValuePrametersTypes, out exception);

            // Act
            Action currentAction = () => methodInfo.Invoke(_listImportJobInstanceFixture, parametersOfgetFieldValue);

            // Assert
            methodInfo.ShouldNotBeNull();
            exception.ShouldBeNull();
            parametersOfgetFieldValue.ShouldNotBeNull();
            parametersOfgetFieldValue.Length.ShouldBe(3);
            methodgetFieldValuePrametersTypes.Length.ShouldBe(3);
            Should.NotThrow(currentAction);
        }
Ejemplo n.º 23
0
 public static T ShouldNotThrow <T>(this Task <T> action, string customMessage)
 {
     return(Should.NotThrow(action, customMessage));
 }
Ejemplo n.º 24
0
 public static void ShouldNotThrow(this Task action, [InstantHandle] Func <string> customMessage)
 {
     Should.NotThrow(action, customMessage);
 }
Ejemplo n.º 25
0
 /*** ShouldNotThrow(Task<T>) ***/
 public static T ShouldNotThrow <T>(this Task <T> action)
 {
     return(Should.NotThrow(action));
 }
Ejemplo n.º 26
0
 public static void ShouldNotThrow(this Task action, string customMessage)
 {
     Should.NotThrow(action, customMessage);
 }
Ejemplo n.º 27
0
 /*** ShouldNotThrow(Task) ***/
 public static void ShouldNotThrow(this Task action)
 {
     Should.NotThrow(action);
 }
Ejemplo n.º 28
0
 public static T ShouldNotThrow <T>(this Func <Task <T> > action, TimeSpan timeoutAfter, [InstantHandle] Func <string> customMessage)
 {
     return(Should.NotThrow(action, timeoutAfter, customMessage));
 }
Ejemplo n.º 29
0
 /*** ShouldNotThrow(Func<Task<T>>, TimeSpan) ***/
 public static T ShouldNotThrow <T>(this Func <Task <T> > action, TimeSpan timeoutAfter)
 {
     return(Should.NotThrow(action, timeoutAfter));
 }
Ejemplo n.º 30
0
 public static T ShouldNotThrow <T>(this Task <T> action, TimeSpan timeoutAfter, string customMessage)
 {
     return(Should.NotThrow(action, timeoutAfter, customMessage));
 }