function r = subsref(val, idx)
    methodList = {...
        'assertElementsAlmostEqual',...
        'assertEqual',...
        'assertError',...
        'assertExceptionThrown',...
        'assertFalse',...
        'assertGreaterThan',...
        'assertLessThan',...
        'assertTrue',...
        'assertVectorsAlmostEqual',...
        'assertWarning'};

    r = [];
    type = idx.type;
    subs = idx.subs;

    for i=methodList
        if (strcmp(type, '.') && strcmp(subs, i{:}))
            r = eval(['@', subs]);
        end
    end

    if isempty(r)
        error('moxunit:undefinedMethod', ['Undefined method: ', subs]);
    end
