public bool PosTest12() { bool retVal = true; TestLibrary.TestFramework.BeginScenario("PosTest12: Return value is void, with 1 reference parameter and 1 value parameter"); try { DelegateDefinitions dd = new DelegateDefinitions(); dd.ReferenceValueParameterVoidDelegate = new ReferenceValueParameterVoidDelegate(dd.TestReferenceValueParameterVoidCallback); if (null == dd.ReferenceValueParameterVoidDelegate) { TestLibrary.TestFramework.LogError("030", "Failed to assign a call back function to a delegate"); retVal = false; } dd.ReferenceValueParameterVoidDelegate( DelegateDefinitions.c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER, DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER); } catch (Exception e) { TestLibrary.TestFramework.LogError("031", "Unexpected exception: " + e); TestLibrary.TestFramework.LogInformation(e.StackTrace); retVal = false; } return(retVal); }
public bool NegTest4() { bool retVal = true; TestLibrary.TestFramework.BeginScenario("NegTest4: Return type is void with 1 reference type parameter and 1 value type parameter"); try { DelegateDefinitions dd = new DelegateDefinitions(); dd.ReferenceValueParameterVoidDelegate = new ReferenceValueParameterVoidDelegate(dd.TestReferenceValueParameterVoidCallbackWithNullValue); dd.ReferenceValueParameterVoidDelegate(null, DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER); } catch (Exception e) { TestLibrary.TestFramework.LogError("051", "Unexpected exception: " + e); TestLibrary.TestFramework.LogInformation(e.StackTrace); retVal = false; } return(retVal); }
public bool NegTest4() { bool retVal = true; TestLibrary.TestFramework.BeginScenario("NegTest4: Return type is void with 1 reference type parameter and 1 value type parameter"); try { DelegateDefinitions dd = new DelegateDefinitions(); dd.ReferenceValueParameterVoidDelegate = new ReferenceValueParameterVoidDelegate(dd.TestReferenceValueParameterVoidCallbackWithNullValue); dd.ReferenceValueParameterVoidDelegate(null, DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER); } catch (Exception e) { TestLibrary.TestFramework.LogError("051", "Unexpected exception: " + e); TestLibrary.TestFramework.LogInformation(e.StackTrace); retVal = false; } return retVal; }
public bool PosTest12() { bool retVal = true; TestLibrary.TestFramework.BeginScenario("PosTest12: Return value is void, with 1 reference parameter and 1 value parameter"); try { DelegateDefinitions dd = new DelegateDefinitions(); dd.ReferenceValueParameterVoidDelegate = new ReferenceValueParameterVoidDelegate(dd.TestReferenceValueParameterVoidCallback); if (null == dd.ReferenceValueParameterVoidDelegate) { TestLibrary.TestFramework.LogError("030", "Failed to assign a call back function to a delegate"); retVal = false; } dd.ReferenceValueParameterVoidDelegate( DelegateDefinitions.c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER, DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER); } catch (Exception e) { TestLibrary.TestFramework.LogError("031", "Unexpected exception: " + e); TestLibrary.TestFramework.LogInformation(e.StackTrace); retVal = false; } return retVal; }