Package accountService

Source Code of accountService.MsgAddStatisticAboutUserTest

package accountService;

import static org.junit.Assert.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import modules.Address;

import org.junit.Test;


public class MsgAddStatisticAboutUserTest {
 
 
 
  @Test
  public void TestMsgAddStatisticAboutUser () {
    Address from = new Address ();
    Address to = new Address ();
    int userId = 1;
    int  clicks = 1 ;
    boolean vin = true ;
    MsgAddStatisticAboutUser msg = new MsgAddStatisticAboutUser(from, to, userId, clicks, vin);
    assertNotNull(msg);
  }
 
  @Test
  public void execTest() {
    Address from = new Address ();
    Address to = new Address ();
    int userId = 1;
    int  clicks = 1 ;
    boolean vin = true ;
    MsgAddStatisticAboutUser msg = new MsgAddStatisticAboutUser(from, to, userId, clicks, vin);
    AccountService someAccountService = mock(AccountService.class);
    msg.exec(someAccountService);
    verify(someAccountService).addStatisticAboutUser(userId,clicks,vin);
  }
}
TOP

Related Classes of accountService.MsgAddStatisticAboutUserTest

TOP
Copyright © 2018 www.massapi.com. 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.