本文整理匯總了Java中com.musala.atmosphere.commons.cs.deviceselection.DeviceSelectorBuilder.build方法的典型用法代碼示例。如果您正苦於以下問題:Java DeviceSelectorBuilder.build方法的具體用法?Java DeviceSelectorBuilder.build怎麽用?Java DeviceSelectorBuilder.build使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.musala.atmosphere.commons.cs.deviceselection.DeviceSelectorBuilder
的用法示例。
在下文中一共展示了DeviceSelectorBuilder.build方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getPresentDeviceFirstTestTwo
import com.musala.atmosphere.commons.cs.deviceselection.DeviceSelectorBuilder; //導入方法依賴的package包/類
@Test
public void getPresentDeviceFirstTestTwo() throws Exception {
DeviceSelectorBuilder selectorBuilder = new DeviceSelectorBuilder().deviceType(DeviceType.EMULATOR_PREFERRED)
.screenHeight(600)
.screenWidth(800);
DeviceSelector deviceSelector = selectorBuilder.build();
when(devicePoolDao.getDevices(eq(deviceSelector), eq(false))).thenReturn(deviceList);
DeviceAllocationInformation deviceDescriptor = poolManager.allocateDevice(deviceSelector);
String deviceId = deviceDescriptor.getDeviceId();
doNothing().when(devicePoolDao).update(firstDevice);
when(devicePoolDao.getDevice(eq(deviceId))).thenReturn(firstDevice);
poolManager.releaseDevice(deviceId);
assertCorrectDeviceFetched(FIRST_DEVICE_SERIAL_NUMBER, deviceDescriptor);
}
示例2: testHasDeviceByIdAndAllocationState
import com.musala.atmosphere.commons.cs.deviceselection.DeviceSelectorBuilder; //導入方法依賴的package包/類
@Test
public void testHasDeviceByIdAndAllocationState() throws Exception {
DeviceInformation deviceInformation = new DeviceInformation();
deviceInformation.setApiLevel(TEST_API_LEVEL);
deviceInformation.setRam(testRam[0]);
DeviceSelectorBuilder selectorBuilder = new DeviceSelectorBuilder().ramCapacity(testRam[0])
.targetApi(TEST_API_LEVEL);
DeviceSelector deviceSelector = selectorBuilder.build();
IDevice firstAddedDevice = testDevicePoolDao.addDevice(deviceInformation,
testDeviceIds[0],
testAgentIds[0],
testPasskeys[0]);
firstAddedDevice.allocate();
testDevicePoolDao.update(firstAddedDevice);
assertTrue("Can't find allocated Device when it is present.",
testDevicePoolDao.hasDevice(deviceSelector, true));
assertFalse("Found not allocated Device when it is not present.",
testDevicePoolDao.hasDevice(deviceSelector, false));
}
示例3: setUp
import com.musala.atmosphere.commons.cs.deviceselection.DeviceSelectorBuilder; //導入方法依賴的package包/類
@BeforeClass
public static void setUp() throws Exception {
DeviceSelectorBuilder selectorBuilder = new DeviceSelectorBuilder().deviceType(DeviceType.DEVICE_PREFERRED);
DeviceSelector testDeviceSelector = selectorBuilder.build();
initTestDevice(testDeviceSelector);
setTestDevice(testDevice);
startMainActivity();
}
示例4: setUp
import com.musala.atmosphere.commons.cs.deviceselection.DeviceSelectorBuilder; //導入方法依賴的package包/類
@BeforeClass
public static void setUp() throws Exception {
DeviceSelectorBuilder selectorBuilder = new DeviceSelectorBuilder().deviceType(DeviceType.DEVICE_PREFERRED);
DeviceSelector testDeviceSelector = selectorBuilder.build();
initTestDevice(testDeviceSelector);
setTestDevice(testDevice);
startDiskSpaceActivity();
}
示例5: setUp
import com.musala.atmosphere.commons.cs.deviceselection.DeviceSelectorBuilder; //導入方法依賴的package包/類
@BeforeClass
public static void setUp() throws Exception {
DeviceSelectorBuilder selectorBuilder = new DeviceSelectorBuilder().deviceType(DeviceType.DEVICE_PREFERRED)
.maxApi(19);
DeviceSelector testDeviceSelector = selectorBuilder.build();
try {
initTestDevice(testDeviceSelector);
setTestDevice(testDevice);
} catch (NoAvailableDeviceFoundException e) {
// Nothing to do here
}
}
示例6: testFilterDevicesByMoreThanOneParameterWhenAvailableResultIsNotFromRequiredType
import com.musala.atmosphere.commons.cs.deviceselection.DeviceSelectorBuilder; //導入方法依賴的package包/類
@Test
public void testFilterDevicesByMoreThanOneParameterWhenAvailableResultIsNotFromRequiredType() throws Exception {
DeviceSelectorBuilder deviceSelectorBuilder = new DeviceSelectorBuilder().deviceType(DeviceType.DEVICE_ONLY)
.isCameraAvailable(TEST_DEVICE_CAMERA_AVAILABILITY[0])
.targetApi(TEST_DEVICE_API_LEVELS[0])
.ramCapacity(TEST_DEVICE_RAM_VALUES[0]);
DeviceSelector deviceSelector = deviceSelectorBuilder.build();
List<IDevice> receivedDevices = deviceDao.filterDevices(deviceSelector, false);
assertTrue(EMPTY_RESULT_LIST_MISMATCH_ERROR_MESSAGE, receivedDevices.isEmpty());
}
示例7: setUp
import com.musala.atmosphere.commons.cs.deviceselection.DeviceSelectorBuilder; //導入方法依賴的package包/類
@BeforeClass
public static void setUp() throws Exception {
DeviceSelectorBuilder selectorBuilder = new DeviceSelectorBuilder().deviceType(DeviceType.DEVICE_PREFERRED);
DeviceSelector testDeviceSelector = selectorBuilder.build();
initTestDevice(testDeviceSelector);
setTestDevice(testDevice);
startMainActivity();
}
示例8: setUp
import com.musala.atmosphere.commons.cs.deviceselection.DeviceSelectorBuilder; //導入方法依賴的package包/類
@BeforeClass
public static void setUp() throws Exception {
DeviceSelectorBuilder selectorBuilder = new DeviceSelectorBuilder().deviceType(DeviceType.DEVICE_PREFERRED);
DeviceSelector testDeviceSelector = selectorBuilder.build();
initTestDevice(testDeviceSelector);
setTestDevice(testDevice);
startScrollActivity();
}
示例9: setUp
import com.musala.atmosphere.commons.cs.deviceselection.DeviceSelectorBuilder; //導入方法依賴的package包/類
@BeforeClass
public static void setUp() throws Exception {
DeviceSelectorBuilder selectorBuilder = new DeviceSelectorBuilder().deviceType(DeviceType.DEVICE_ONLY)
.maxApi(19);
DeviceSelector testDeviceSelector = selectorBuilder.build();
try {
initTestDevice(testDeviceSelector);
} catch (NoAvailableDeviceFoundException e) {
}
assumeNotNull(testDevice);
setTestDevice(testDevice);
}
示例10: testGetDeviceByNonexistingOperatingSystem
import com.musala.atmosphere.commons.cs.deviceselection.DeviceSelectorBuilder; //導入方法依賴的package包/類
@Test(expected = NoAvailableDeviceFoundException.class)
public void testGetDeviceByNonexistingOperatingSystem() {
DeviceSelectorBuilder selectorBuilder = new DeviceSelectorBuilder().deviceOs(DeviceOs.JELLY_BEAN_4_1);
DeviceSelector deviceSelector = selectorBuilder.build();
builder.getDevice(deviceSelector);
}
開發者ID:MusalaSoft,項目名稱:atmosphere-integration-tests,代碼行數:8,代碼來源:BuilderDeviceSelectionIntegrationTest.java
示例11: setUp
import com.musala.atmosphere.commons.cs.deviceselection.DeviceSelectorBuilder; //導入方法依賴的package包/類
@BeforeClass
public static void setUp() throws Exception {
DeviceSelectorBuilder selectorBuilder = new DeviceSelectorBuilder().deviceType(DeviceType.DEVICE_PREFERRED);
DeviceSelector testDeviceSelector = selectorBuilder.build();
initTestDevice(testDeviceSelector);
setTestDevice(testDevice);
startToastMessageActivity();
}
示例12: testGetDeviceByRAM
import com.musala.atmosphere.commons.cs.deviceselection.DeviceSelectorBuilder; //導入方法依賴的package包/類
@Test
public void testGetDeviceByRAM() {
int wantedRam = 513;
DeviceSelectorBuilder selectorBuilder = new DeviceSelectorBuilder().ramCapacity(wantedRam);
DeviceSelector deviceSelector = selectorBuilder.build();
Device receivedDevice = builder.getDevice(deviceSelector);
DeviceInformation information = receivedDevice.getInformation();
int realRam = information.getRam();
assertEquals("Device RAM does not match requested RAM.", wantedRam, realRam);
}
開發者ID:MusalaSoft,項目名稱:atmosphere-integration-tests,代碼行數:14,代碼來源:BuilderDeviceSelectionIntegrationTest.java
示例13: getAndSetMobileDataStateOnEmulators
import com.musala.atmosphere.commons.cs.deviceselection.DeviceSelectorBuilder; //導入方法依賴的package包/類
/**
* Works only for emulators!
*/
@Test
public void getAndSetMobileDataStateOnEmulators() {
DeviceSelectorBuilder selectorBuilder = new DeviceSelectorBuilder().deviceType(DeviceType.EMULATOR_ONLY);
DeviceSelector testDeviceSelector = selectorBuilder.build();
testDevice = builder.getDevice(testDeviceSelector);
assertNotNull("No emulator found.", testDevice);
MobileDataState expectedState = MobileDataState.UNREGISTERED;
testDevice.setMobileDataState(expectedState);
MobileDataState actualState = testDevice.getMobileDataState();
assertEquals("Mobile data states didn't match.", expectedState, actualState);
}
示例14: setUp
import com.musala.atmosphere.commons.cs.deviceselection.DeviceSelectorBuilder; //導入方法依賴的package包/類
@BeforeClass
public static void setUp() throws Exception {
DeviceSelectorBuilder selectorBuilder = new DeviceSelectorBuilder().deviceType(DeviceType.EMULATOR_ONLY);
DeviceSelector testDeviceSelector = selectorBuilder.build();
initTestDevice(testDeviceSelector);
setTestDevice(testDevice);
startOrientationActivity();
}
示例15: setUp
import com.musala.atmosphere.commons.cs.deviceselection.DeviceSelectorBuilder; //導入方法依賴的package包/類
@BeforeClass
public static void setUp() throws Exception {
DeviceSelectorBuilder selectorBuilder = new DeviceSelectorBuilder().deviceType(DeviceType.DEVICE_PREFERRED);
DeviceSelector testDeviceSelector = selectorBuilder.build();
initTestDevice(testDeviceSelector);
setTestDevice(testDevice);
startDetectAudioTestActivity();
}