Search in sources :

Example 1 with AgentDataModel

use of com.github.vase4kin.teamcityapp.agents.data.AgentDataModel in project TeamCityApp by vase4kin.

the class AgentPresenterImplTest method testCreateModel.

@Test
public void testCreateModel() throws Exception {
    when(mAgent.getName()).thenReturn("name");
    List<Agent> agents = new ArrayList<>();
    agents.add(mAgent);
    AgentDataModel dataModel = mPresenter.createModel(agents);
    assertThat(dataModel.getName(0), is("name"));
    assertThat(dataModel.getItemCount(), is(1));
    verifyNoMoreInteractions(mView, mDataManager, mTracker, mValueExtractor);
}
Also used : Agent(com.github.vase4kin.teamcityapp.agents.api.Agent) ArrayList(java.util.ArrayList) AgentDataModel(com.github.vase4kin.teamcityapp.agents.data.AgentDataModel) Test(org.junit.Test)

Aggregations

Agent (com.github.vase4kin.teamcityapp.agents.api.Agent)1 AgentDataModel (com.github.vase4kin.teamcityapp.agents.data.AgentDataModel)1 ArrayList (java.util.ArrayList)1 Test (org.junit.Test)1