# Copyright 2011 Quanta Research Cambridge, Inc.
#
#    Licensed under the Apache License, Version 2.0 (the "License");
#    you may not use this file except in compliance with the License.
#    You may obtain a copy of the License at
#
#        http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS,
#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#    See the License for the specific language governing permissions and
#    limitations under the License.
"""Class to describe actions to be included in a stress test."""


class BasherAction(object):
    """
    Used to describe each action that you would like to include in a test run.
    """

    def __init__(self, test_case, probability, pargs=[], kargs={}):
        """
        `test_case`  : the name of the class that implements the action
        `pargs`      : positional arguments to the constructor of `test_case`
        `kargs`      : keyword arguments to the constructor of `test_case`
        `probability`: frequency that each action
        """
        self.test_case = test_case
        self.pargs = pargs
        self.kargs = kargs
        self.probability = probability

    def invoke(self, manager, state):
        """
        Calls the `run` method of the `test_case`.
        """
        return self.test_case.run(manager, state, *self.pargs, **self.kargs)

    def __str__(self):
        return self.test_case.__class__.__name__
