setMockWindowsDeviceInfo static method

  1. @visibleForTesting
void setMockWindowsDeviceInfo({
  1. String? computerName,
  2. int? numberOfCores,
  3. int? systemMemoryInMegabytes,
  4. String? userName,
  5. int? majorVersion,
  6. int? minorVersion,
  7. int? buildNumber,
  8. int? platformId,
  9. String? csdVersion,
  10. int? servicePackMajor,
  11. int? servicePackMinor,
  12. int? suitMask,
  13. int? productType,
  14. int? reserved,
  15. String? buildLab,
  16. String? buildLabEx,
  17. Uint8List? digitalProductId,
  18. String? displayVersion,
  19. String? editionId,
  20. DateTime? installDate,
  21. String? productId,
  22. String? productName,
  23. String? registeredOwner,
  24. String? releaseId,
  25. 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,
  );
}