def TestInitWithListOfFailureActions(self): actions = [ FailureActionTypeFactory.CreateNoAction(long(1))] resetPeriod = FailureActionConfigurationResetPeriodType(1) rebootMsg = FailureActionConfigurationRebootMessageType('MyRebootMessage') commandLine = FailureActionConfigurationCommandLineType('MyCommandLine') failureActions = FailureActionConfigurationType(actions, resetPeriod, rebootMsg, commandLine) t = failureActions.StringValue() self.assertEquals(failureActions.StringValue(), failureActions.StringValue()) self.assertEquals(failureActions.Win32Value(), failureActions.Win32Value())
def TestInitWithUnBoxedCommandLine(self): actions = [ FailureActionTypeFactory.CreateNoAction(long(1))] resetPeriod = FailureActionConfigurationResetPeriodType(1) rebootMsg = FailureActionConfigurationRebootMessageType('MyRebootMessage') commandLine = 'MyCommandLine' commandLine1 = FailureActionConfigurationCommandLineType('MyCommandLine') config1 = FailureActionConfigurationType(actions, resetPeriod, rebootMsg, commandLine) config2 = FailureActionConfigurationType(actions, resetPeriod, rebootMsg, commandLine1) self.assertEquals(config1.StringValue(), config2.StringValue()) self.assertEquals(config1.Win32Value(), config2.Win32Value())
def TestInitWithParametersNone(self): value = None config1 = FailureActionConfigurationType(value, value, value, value) config2 = FailureActionConfigurationType(value, value, value, value) self.assertEquals(config1.StringValue(), config2.StringValue()) self.assertEquals(config1.Win32Value(), config2.Win32Value())