private bool CanArrangeObject(ArrangedFieldViewModel source) { return this.CanArrangeObject(source.ArrangedItems.FirstOrDefault()); }
private void RearrangeObject(ArrangedFieldViewModel source) { if (this.CanArrangeObject(source)) { this.ArrangedItems.Add(source.ArrangedItems.First()); source.ArrangedItems.Clear(); } }
public void ShouldBeDisabledForNonFurniture2() { Chair chairModel = new Chair(); Table tableModel = new Table(); ArrangementPageViewModel vm = new ArrangementPageViewModel(Layout, chairModel, tableModel); ArrangedFieldViewModel field = new ArrangedFieldViewModel(new FlowerField()); field.ArrangeObjectCommand.Execute(new Pathway()); Assert.IsFalse(vm.RemoveObjectCommand.CanExecute(field)); }