setMockWindowsDeviceInfo static method
void
setMockWindowsDeviceInfo({
- String? computerName,
- int? numberOfCores,
- int? systemMemoryInMegabytes,
- String? userName,
- int? majorVersion,
- int? minorVersion,
- int? buildNumber,
- int? platformId,
- String? csdVersion,
- int? servicePackMajor,
- int? servicePackMinor,
- int? suitMask,
- int? productType,
- int? reserved,
- String? buildLab,
- String? buildLabEx,
- Uint8List? digitalProductId,
- String? displayVersion,
- String? editionId,
- DateTime? installDate,
- String? productId,
- String? productName,
- String? registeredOwner,
- String? releaseId,
- String? deviceId,
Mocks WindowsDeviceInfo
for testing purposes.
Implementation
@visibleForTesting
static void setMockWindowsDeviceInfo({
String? computerName,
int? numberOfCores,
int? systemMemoryInMegabytes,
String? userName,
int? majorVersion,
int? minorVersion,
int? buildNumber,
int? platformId,
String? csdVersion,
int? servicePackMajor,
int? servicePackMinor,
int? suitMask,
int? productType,
int? reserved,
String? buildLab,
String? buildLabEx,
Uint8List? digitalProductId,
String? displayVersion,
String? editionId,
DateTime? installDate,
String? productId,
String? productName,
String? registeredOwner,
String? releaseId,
String? deviceId,
}) {
mockWindowsDeviceInfo = plugin.WindowsDeviceInfo(
computerName: computerName ?? mockWindowsDeviceInfo.computerName,
numberOfCores: numberOfCores ?? mockWindowsDeviceInfo.numberOfCores,
systemMemoryInMegabytes: systemMemoryInMegabytes ??
mockWindowsDeviceInfo.systemMemoryInMegabytes,
userName: userName ?? mockWindowsDeviceInfo.userName,
majorVersion: majorVersion ?? mockWindowsDeviceInfo.majorVersion,
minorVersion: minorVersion ?? mockWindowsDeviceInfo.minorVersion,
buildNumber: buildNumber ?? mockWindowsDeviceInfo.buildNumber,
platformId: platformId ?? mockWindowsDeviceInfo.platformId,
csdVersion: csdVersion ?? mockWindowsDeviceInfo.csdVersion,
servicePackMajor:
servicePackMajor ?? mockWindowsDeviceInfo.servicePackMajor,
servicePackMinor:
servicePackMinor ?? mockWindowsDeviceInfo.servicePackMinor,
suitMask: suitMask ?? mockWindowsDeviceInfo.suitMask,
productType: productType ?? mockWindowsDeviceInfo.productType,
reserved: reserved ?? mockWindowsDeviceInfo.reserved,
buildLab: buildLab ?? mockWindowsDeviceInfo.buildLab,
buildLabEx: buildLabEx ?? mockWindowsDeviceInfo.buildLabEx,
digitalProductId:
digitalProductId ?? mockWindowsDeviceInfo.digitalProductId,
displayVersion: displayVersion ?? mockWindowsDeviceInfo.displayVersion,
editionId: editionId ?? mockWindowsDeviceInfo.editionId,
installDate: installDate ?? mockWindowsDeviceInfo.installDate,
productId: productId ?? mockWindowsDeviceInfo.productId,
productName: productName ?? mockWindowsDeviceInfo.productName,
registeredOwner: registeredOwner ?? mockWindowsDeviceInfo.registeredOwner,
releaseId: releaseId ?? mockWindowsDeviceInfo.releaseId,
deviceId: deviceId ?? mockWindowsDeviceInfo.deviceId,
);
}