1 /*******************************************************************************
2 * Copyright (c) 2009, 2010 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.tests
.request
;
15 import junit
.framework
.TestCase
;
17 import org
.eclipse
.linuxtools
.tmf
.event
.TmfEvent
;
18 import org
.eclipse
.linuxtools
.tmf
.request
.TmfDataRequest
;
21 * <b><u>TmfDataRequestTest</u></b>
23 * TODO: Implement me. Please.
25 public class TmfDataRequestTest
extends TestCase
{
27 // ------------------------------------------------------------------------
29 // ------------------------------------------------------------------------
31 public TmfDataRequestTest(String name
) {
36 protected void setUp() throws Exception
{
41 protected void tearDown() throws Exception
{
45 // ------------------------------------------------------------------------
47 // ------------------------------------------------------------------------
49 public void testTmfDataRequest() {
50 TmfDataRequest
<TmfEvent
> request
= new TmfDataRequest
<TmfEvent
>(TmfEvent
.class);
52 assertEquals("getIndex", 0, request
.getIndex());
53 assertEquals("getNbRequestedEvents", TmfDataRequest
.ALL_DATA
, request
.getNbRequested());
54 assertEquals("getBlockize", TmfDataRequest
.DEFAULT_BLOCK_SIZE
, request
.getBlockize());
57 public void testTmfDataRequestIndex() {
58 TmfDataRequest
<TmfEvent
> request
= new TmfDataRequest
<TmfEvent
>(TmfEvent
.class, 10);
60 assertEquals("getIndex", 10, request
.getIndex());
61 assertEquals("getNbRequestedEvents", TmfDataRequest
.ALL_DATA
, request
.getNbRequested());
62 assertEquals("getBlockize", TmfDataRequest
.DEFAULT_BLOCK_SIZE
, request
.getBlockize());
65 public void testTmfDataRequestIndexNbRequested() {
66 TmfDataRequest
<TmfEvent
> request
= new TmfDataRequest
<TmfEvent
>(TmfEvent
.class, 10, 100);
68 assertEquals("getIndex", 10, request
.getIndex());
69 assertEquals("getNbRequestedEvents", 100, request
.getNbRequested());
70 assertEquals("getBlockize", TmfDataRequest
.DEFAULT_BLOCK_SIZE
, request
.getBlockize());
73 public void testTmfDataRequestIndexNbEventsBlocksize() {
74 TmfDataRequest
<TmfEvent
> request
= new TmfDataRequest
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
76 assertEquals("getIndex", 10, request
.getIndex());
77 assertEquals("getNbRequestedEvents", 100, request
.getNbRequested());
78 assertEquals("getBlockize", 200, request
.getBlockize());
This page took 0.031363 seconds and 5 git commands to generate.