/// <summary> /// Returns the hardware specification for the local machine. /// </summary> /// <returns> /// The hardware specification for the local machine. /// </returns> public static HardwareSpecification ForLocalMachine() { var memorySizes = LocalMachinePhysicalMemorySize(); var disks = DiskSpecification.ForLocalMachine(); return(new HardwareSpecification( memorySizes.MaximumProcessMemorySizeInKiloBytes, memorySizes.TotalPhysicalMemorySizeInKiloBytes, memorySizes.TotalVirtualMemorySizeInKiloBytes, disks)); }
public void Create() { var name = "a"; var serial = "b"; ulong totalSpace = 10; ulong freeSpace = 5; var disk = new DiskSpecification(name, serial, totalSpace, freeSpace); Assert.AreEqual(name, disk.Name); Assert.AreEqual(serial, disk.SerialNumber); Assert.AreEqual(totalSpace, disk.TotalSpaceInBytes); Assert.AreEqual(freeSpace, disk.AvailableSpaceInBytes); }