2 * Copyright © 2015 ZTE and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.route;
10 import com.highstreet.technologies.odl.app.impl.tools.BandwidthCalculator;
11 import com.highstreet.technologies.odl.app.impl.tools.Unit;
12 import org.junit.Test;
14 import static com.highstreet.technologies.odl.app.impl.tools.Unit.*;
17 * Created by odl on 17-6-8.
19 public class TestBandwidthCalculator
22 public void testCalc() throws Exception
24 BandwidthCalculator bc = new BandwidthCalculator(56000, (short) 64, (byte) 90);
25 System.out.println(bc.calc());
26 System.out.println(bc.calc(m_bits_s) + " " + m_bits_s.name());
27 System.out.println(bc.calc(Unit.m_byte_s) + " " + m_byte_s.name());
28 System.out.println(bc.calc(Unit.k_bits_s) + " " + k_bits_s.name());