コード例 #1
0
            public void ContextSetup()
            {
                _masterModel = new MasterModel();
                var notDeleted = _masterModel.CreateProject(x => x.Name = "Not Deleted");

                notDeleted.CreateGroup().AddLight(new Light(new ZWaveValueIdentity(1, 11, 123))).AddLight(new Light(new ZWaveValueIdentity(1, 12, 123)));
                notDeleted.CreateGroup().AddLight(new Light(new ZWaveValueIdentity(1, 13, 123))).AddLight(new Light(new ZWaveValueIdentity(1, 14, 123)));
                var toBeDeleted = _masterModel.CreateProject(x => x.Name = "To Be Deleted");

                toBeDeleted.CreateGroup().AddLight(new Light(new ZWaveValueIdentity(1, 21, 123))).AddLight(new Light(new ZWaveValueIdentity(1, 22, 123)));
                toBeDeleted.CreateGroup().AddLight(new Light(new ZWaveValueIdentity(1, 23, 123))).AddLight(new Light(new ZWaveValueIdentity(1, 24, 123)));

                _masterModel.RemoveProject(toBeDeleted.Id);
            }