Package org.easymock

Examples of org.easymock.IArgumentMatcher


      verify(command);
   }

   public static Exception classEq(final Class<? extends Exception> in) {
      reportMatcher(new IArgumentMatcher() {

         @Override
         public void appendTo(StringBuffer buffer) {
            buffer.append("classEq(");
            buffer.append(in);
View Full Code Here


      verify(command);
   }

   public static Exception classEq(final Class<? extends Exception> in) {
      reportMatcher(new IArgumentMatcher() {

         @Override
         public void appendTo(StringBuffer buffer) {
            buffer.append("classEq(");
            buffer.append(in);
View Full Code Here

        Marshaller marshaller = control.createMock(Marshaller.class);
        ContextUtils.getJAXBContext().createMarshaller();
        EasyMock.expectLastCall().andReturn(marshaller);
        marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
        EasyMock.expectLastCall();
        IArgumentMatcher matcher = new JAXBEltMatcher();
        int len = expectFaultTo ? expectedValues.length : expectedValues.length - 1;
        for (int i = 0; i < len; i++) {
            if (!requestor || i != 4) {
                EasyMock.reportMatcher(matcher);
                EasyMock.eq(header);
View Full Code Here

    public void testSetConfiguration() throws Exception
    {
        EasyMock.expect(mockConfiguration.getBundleLocation()).andReturn(null);
        EasyMock.expect(mockConfiguration.getProperties()).andReturn(new Hashtable());
        EasyMock.reportMatcher(new IArgumentMatcher()
        {
            public boolean matches( Object argument )
            {
                return ((Dictionary) argument).get("testkey").equals("testvalue");
            }
View Full Code Here

    protected static Artifact artifactMatcher(final URL url,
                                              final String group,
                                              final String name,
                                              final String version) {
        reportMatcher(new IArgumentMatcher() {

            public boolean matches(Object object) {
                if (!(object instanceof Artifact)) {
                    return false;
                }
View Full Code Here

        // scope.stop();
    }

    // todo this could be generalized and moved to test module
    public static Message eqMessage() {
        reportMatcher(new IArgumentMatcher() {
            public boolean matches(Object object) {
                if (!(object instanceof Message)) {
                    return false;
                }
                final Message msg = (Message) object;
View Full Code Here

        verify(invoker);
    }

    // todo this could be generalized and moved to test module
    public static Message eqMessage() {
        reportMatcher(new IArgumentMatcher() {
            public boolean matches(Object object) {
                if (!(object instanceof Message)) {
                    return false;
                }
                final Message msg = (Message) object;
View Full Code Here

//        scope.stop();
    }

    // todo this could be generalized and moved to test module
    public static Message eqMessage() {
        reportMatcher(new IArgumentMatcher() {
            public boolean matches(Object object) {
                if (!(object instanceof Message)) {
                    return false;
                }
                final Message msg = (Message) object;
View Full Code Here

        Marshaller marshaller = control.createMock(Marshaller.class);
        ContextUtils.getJAXBContext().createMarshaller();
        EasyMock.expectLastCall().andReturn(marshaller);
        marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
        EasyMock.expectLastCall();
        IArgumentMatcher matcher = new JAXBEltMatcher();
        int len = expectFaultTo ? expectedValues.length : expectedValues.length - 1;
        for (int i = 0; i < len; i++) {
            if (!requestor || i != 4) {
                EasyMock.reportMatcher(matcher);
                EasyMock.eq(header);
View Full Code Here

    {
        EasyMock.expect(mockBundleContext.getProperty(DirectoryWatcher.LOG_DEFAULT)).andReturn(null);
        EasyMock.expect(mockBundleContext.getProperty(DirectoryWatcher.LOG_LEVEL)).andReturn(null);
        EasyMock.expect(mockConfiguration.getBundleLocation()).andReturn(null);
        EasyMock.expect(mockConfiguration.getProperties()).andReturn(new Hashtable<String, Object>());
        EasyMock.reportMatcher(new IArgumentMatcher()
        {
            public boolean matches( Object argument )
            {
                return ((Dictionary) argument).get("testkey").equals("testvalue");
            }
View Full Code Here

TOP

Related Classes of org.easymock.IArgumentMatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.