Package org.mockito.internal.matchers

Examples of org.mockito.internal.matchers.Any


        // when
        ByteArrayOutputStream serialized = serializeMock(anyMock);

        // then
        Any readObject = deserializeMock(serialized, Any.class);
        readObject.matches("");
    }
View Full Code Here


    }

    @Test
    public void should_serialize_object_mock() throws Exception {
        // given
        Any mock = mock(Any.class);

        // when
        ByteArrayOutputStream serialized = serializeMock(mock);

        // then
View Full Code Here

    }

    @Test
    public void should_serialize_real_partial_mock() throws Exception {
        // given
        Any mock = mock(Any.class, withSettings().serializable());
        when(mock.matches(anyObject())).thenCallRealMethod();

        // when
        ByteArrayOutputStream serialized = serializeMock(mock);

        // then
        Any readObject = deserializeMock(serialized, Any.class);
        readObject.matches("");
    }
View Full Code Here

TOP

Related Classes of org.mockito.internal.matchers.Any

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.