Пример #1
0
        public void Add()
        {
            var disk = VirtualDiskCommon.FindByMarkedCode("tiny", QueryLevel.None);

            Assert.AreEqual("tiny", disk.MarkedCode);
            Assert.AreEqual("微小的磁盘空间", disk.Description);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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());
            }
        }
Пример #4
0
        protected override DTObject DynamicInvoke(dynamic arg)
        {
            VirtualDisk disk = VirtualDiskCommon.FindById(arg.DiskId, QueryLevel.None);

            return(DTObject.CreateReusable("{id,name}", disk.Root));
        }