Package samples.nativemocking

Examples of samples.nativemocking.NativeService


*/
public class NativeMockingSampleTest {

  @Test
  public void testMockNative() throws Exception {
    NativeService nativeServiceMock = createMock(NativeService.class);
    NativeMockingSample tested = new NativeMockingSample(nativeServiceMock);

    final String expectedParameter = "question";
    final String expectedReturnValue = "answer";
    expect(nativeServiceMock.invokeNative(expectedParameter)).andReturn(expectedReturnValue);

    replay(nativeServiceMock);

    assertEquals(expectedReturnValue, tested.invokeNativeMethod(expectedParameter));

View Full Code Here

TOP

Related Classes of samples.nativemocking.NativeService

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.