Ray Milkey | e022ef6 | 2016-06-08 15:17:19 -0700 | [diff] [blame] | 1 | package org.onosproject.net.driver; |
| 2 | |
| 3 | import java.util.Set; |
| 4 | |
| 5 | import org.junit.Test; |
| 6 | import org.onosproject.net.DeviceId; |
| 7 | |
| 8 | /** |
| 9 | * Base test class for driver loading. |
| 10 | */ |
| 11 | public abstract class AbstractDriverLoaderTest { |
| 12 | |
| 13 | private class DriverAdminServiceAdapter implements DriverAdminService { |
| 14 | @Override |
| 15 | public Set<DriverProvider> getProviders() { |
| 16 | return null; |
| 17 | } |
| 18 | |
| 19 | @Override |
| 20 | public void registerProvider(DriverProvider provider) { |
| 21 | |
| 22 | } |
| 23 | |
| 24 | @Override |
| 25 | public void unregisterProvider(DriverProvider provider) { |
| 26 | |
| 27 | } |
| 28 | |
| 29 | @Override |
| 30 | public Set<Driver> getDrivers() { |
| 31 | return null; |
| 32 | } |
| 33 | |
| 34 | @Override |
| 35 | public Set<Driver> getDrivers(Class<? extends Behaviour> withBehaviour) { |
| 36 | return null; |
| 37 | } |
| 38 | |
| 39 | @Override |
| 40 | public Driver getDriver(String mfr, String hw, String sw) { |
| 41 | return null; |
| 42 | } |
| 43 | |
| 44 | @Override |
| 45 | public Driver getDriver(DeviceId deviceId) { |
| 46 | return null; |
| 47 | } |
| 48 | |
| 49 | @Override |
| 50 | public DriverHandler createHandler(DeviceId deviceId, String... credentials) { |
| 51 | return null; |
| 52 | } |
| 53 | |
| 54 | @Override |
| 55 | public Driver getDriver(String driverName) { |
| 56 | return null; |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | protected AbstractDriverLoader loader; |
| 61 | |
| 62 | @Test |
| 63 | public void testLoader() { |
| 64 | loader.driverAdminService = new DriverAdminServiceAdapter(); |
| 65 | loader.activate(); |
| 66 | loader.deactivate(); |
| 67 | } |
| 68 | } |