public void Add() { var disk = VirtualDiskCommon.FindByMarkedCode("tiny", QueryLevel.None); Assert.AreEqual("tiny", disk.MarkedCode); Assert.AreEqual("微小的磁盘空间", disk.Description); }
public void Update() { var id = this.Fixture.Get <VirtualDisk>().Id; Util.UpdateDisk(id, "tiny1", "编辑描述"); var disk = VirtualDiskCommon.FindByMarkedCode("tiny1", QueryLevel.None); Assert.AreEqual("编辑描述", disk.Description); Assert.AreEqual("tiny1", disk.MarkedCode); }
public void Delete() { var diskId = Guid.Empty; { var disk = Util.AddDisk(null, null); diskId = disk.Id; } Util.DeleteDisk(diskId); { var obj = VirtualDiskCommon.FindById(diskId, QueryLevel.None); Assert.IsTrue(obj.IsEmpty()); } }
protected override DTObject DynamicInvoke(dynamic arg) { VirtualDisk disk = VirtualDiskCommon.FindById(arg.DiskId, QueryLevel.None); return(DTObject.CreateReusable("{id,name}", disk.Root)); }