public void allVolumesShouldHaveDiskSize() { //coll.Where(dev => !(dev.DiskSize.HasValue && dev.DiskSize.Value >= 0)).All(dev => //{ // System.Diagnostics.Trace.WriteLine("Device: " + dev.DevicePath + " doesn't have a size"); // return true; //}); tokenSource = new CancellationTokenSource(); Assert.DoesNotThrow(() => { var tsk = engine.BuildVolumesAsync(tokenSource.Token); tsk.Wait(); coll = tsk.Result; }); Assert.True(coll.All(dev => !(dev.VolumeSize.HasValue && dev.VolumeSize.Value >= 0))); }