
    Test (and document) adapting content to payables

    >>> from zope.interface import implements
    >>> from Products.Five.utilities.marker import mark
    >>> from Products.CMFCore.interfaces import IContentish

    >>> from Products.PloneGetPaid import interfaces
    >>> from getpaid.core import interfaces as coreinterfaces


    We want to make sure the right payable adapter is invoked for the
    right marker

    >>> class Content(object):
    ...     implements(IContentish)

    >>> o1 = Content()
    >>> mark(o1, interfaces.IPayableMarker)
    >>> o2 = Content()
    >>> mark(o2, interfaces.IBuyableMarker)
    >>> o3 = Content()
    >>> mark(o3, interfaces.IPremiumMarker)
    >>> o4 = Content()
    >>> mark(o4, interfaces.IShippableMarker)
    >>> o5 = Content()
    >>> mark(o5, interfaces.IDonatableMarker)

    This first one should fail since there is no adapter provided for
    the base interface of IPayableMarker

    >>> coreinterfaces.IPayable(o1)
    Traceback (most recent call last):
    ...
    TypeError: ('Could not adapt', <Content object at ...>, <InterfaceClass getpaid.core.interfaces.IPayable>)

    >>> coreinterfaces.IPayable(o2)
    <Products.PloneGetPaid.content.BuyableContentAdapter object at ...>
    >>> coreinterfaces.IPayable(o3)
    <Products.PloneGetPaid.content.PremiumContentAdapter object at ...>
    >>> coreinterfaces.IPayable(o4)
    <Products.PloneGetPaid.content.ShippableContentAdapter object at ...>
    >>> coreinterfaces.IPayable(o5)
    <Products.PloneGetPaid.content.DonatableContentAdapter object at ...>
