def test_returns_invalid_request_object_for_wrong_params():
    req = reqo.VolumeSetRequestObject(volume_level="louder")

    assert bool(req) is False
    assert isinstance(req, InvalidRequestObject)
    assert req.has_errors() is True
def test_build_volume_set_request_object_without_params():
    req = reqo.VolumeSetRequestObject()

    assert bool(req) is True
def test_returns_invalid_request_object_for_out_of_range_params():
    req = reqo.VolumeSetRequestObject(volume_level=-1234)

    assert bool(req) is False
    assert isinstance(req, InvalidRequestObject)
    assert req.has_errors() is True
def test_build_volume_set_request_object_without_params():
    with pytest.raises(RequestObjectInitializationException):
        req = reqo.VolumeSetRequestObject(None)
def test_returns_invalid_request_object_for_wrong_params():
    with pytest.raises(RequestObjectInitializationException):
        req = reqo.VolumeSetRequestObject(volume_level="louder")
def test_returns_invalid_request_object_for_out_of_range_params():
    with pytest.raises(RequestObjectInitializationException):
        reqo.VolumeSetRequestObject(volume_level=-1234)