@Test public void create_profileTypeIs3G(){ Properties property01 = Mockito.mock(Properties.class); Profile3G profileTest = (Profile3G)profilefactory.create(ProfileType.T3G, property01); assertEquals(5,profileTest.getDchFachTimer(),0.0); }
@Override public Profile create(ProfileType typeParm, Properties prop) { Profile prof = null; ProfileType type = typeParm == null ? ProfileType.LTE : typeParm; switch(type){ case LTE: prof = createLTE(prop); break; case T3G: prof = create3G(prop); break; case WIFI: prof = createWiFi(prop); break; default: return null; } return prof; }
ProfileFactoryImpl implements IProfileFactory { @Override public Profile create(ProfileType typeParm, Properties prop) { Profile prof = null; ProfileType type = typeParm == null ? ProfileType.LTE : typeParm; switch(type){ case LTE: prof = createLTE(prop); break; case T3G: prof = create3G(prop); break; case WIFI: prof = createWiFi(prop); break; default: return null; } return prof; } }
ProfileFactoryImpl implements IProfileFactory { @Override public Profile create(ProfileType typeParm, Properties prop) { Profile prof = null; ProfileType type = typeParm == null ? ProfileType.LTE : typeParm; switch(type){ case LTE: prof = createLTE(prop); break; case T3G: prof = create3G(prop); break; case WIFI: prof = createWiFi(prop); break; default: return null; } return prof; }  }
ProfileFactoryImpl implements IProfileFactory { @Override public Profile create(ProfileType typeParm, Properties prop) { Profile prof = null; ProfileType type = typeParm == null ? ProfileType.LTE : typeParm; switch(type){ case LTE: prof = createLTE(prop); break; case T3G: prof = create3G(prop); break; case WIFI: prof = createWiFi(prop); break; default: return null; } return prof; }  @Override Profile create(ProfileType typeParm, Properties prop); @Override double energy3G(double time1, double time2, RRCState state, Profile3G prof); @Override Profile create3Gdefault(); @Override Profile create3GFromDefaultResourceFile(); @Override Profile create3GFromFilePath(String filepath); @Override Profile create3G(InputStream input); @Override Profile create3G(Properties properties); @Override void save3G(String filepath, Profile3G prof); @Override void save3G(OutputStream output, Profile3G prof); @Override double energyLTE(double time1, double time2, RRCState state, ProfileLTE prof, List<PacketInfo> packets); @Override Profile createLTEdefault(); @Override Profile createLTEFromDefaultResourceFile(); @Override Profile createLTEFromFilePath(String filepath); @Override Profile createLTE(InputStream input); @Override Profile createLTE(Properties properties); @Override void saveLTE(String filepath, ProfileLTE prof); @Override void saveLTE(OutputStream output, ProfileLTE prof); @Override double energyWiFi(double time1, double time2, RRCState state , ProfileWiFi prof); @Override Profile createWiFidefault(); @Override Profile createWiFiFromFilePath(String filepath); @Override Profile createWiFiFromDefaultResourceFile(); @Override Profile createWiFi(InputStream input); @Override Profile createWiFi(Properties properties); @Override void saveWiFi(String filepath, ProfileWiFi prof); @Override void saveWiFi(OutputStream output, ProfileWiFi prof); }
ProfileFactoryImpl implements IProfileFactory { @Override public Profile create(ProfileType typeParm, Properties prop) { Profile prof = null; ProfileType type = typeParm == null ? ProfileType.LTE : typeParm; switch(type){ case LTE: prof = createLTE(prop); break; case T3G: prof = create3G(prop); break; case WIFI: prof = createWiFi(prop); break; default: return null; } return prof; }  @Override Profile create(ProfileType typeParm, Properties prop); @Override double energy3G(double time1, double time2, RRCState state, Profile3G prof); @Override Profile create3Gdefault(); @Override Profile create3GFromDefaultResourceFile(); @Override Profile create3GFromFilePath(String filepath); @Override Profile create3G(InputStream input); @Override Profile create3G(Properties properties); @Override void save3G(String filepath, Profile3G prof); @Override void save3G(OutputStream output, Profile3G prof); @Override double energyLTE(double time1, double time2, RRCState state, ProfileLTE prof, List<PacketInfo> packets); @Override Profile createLTEdefault(); @Override Profile createLTEFromDefaultResourceFile(); @Override Profile createLTEFromFilePath(String filepath); @Override Profile createLTE(InputStream input); @Override Profile createLTE(Properties properties); @Override void saveLTE(String filepath, ProfileLTE prof); @Override void saveLTE(OutputStream output, ProfileLTE prof); @Override double energyWiFi(double time1, double time2, RRCState state , ProfileWiFi prof); @Override Profile createWiFidefault(); @Override Profile createWiFiFromFilePath(String filepath); @Override Profile createWiFiFromDefaultResourceFile(); @Override Profile createWiFi(InputStream input); @Override Profile createWiFi(Properties properties); @Override void saveWiFi(String filepath, ProfileWiFi prof); @Override void saveWiFi(OutputStream output, ProfileWiFi prof);  }