public void SetResourceAsItemType() { var editor = new ImageUriEditor(new Window()); var value = editor.EditValue(context, serviceProvider.Object, "image://"); Assert.Equal("Resource", (string)item.Data.ItemType); }
public void ReturnUriForComponent() { var editor = new ImageUriEditor(new Window()); var value = editor.EditValue(context, serviceProvider.Object, "image://"); Assert.Equal("pack://application:,,,/project;component/assets/icon.ico", value); }
public void ItemTypeIsUnchanged() { item.Data.ItemType = "None"; var editor = new ImageUriEditor(new Window()); var value = editor.EditValue(context, serviceProvider.Object, "image://"); Assert.Equal("None", (string)item.Data.ItemType); }
public void CustomToolIsUnchanged() { item.Data.CustomTool = "MyTool"; var editor = new ImageUriEditor(new Window()); var value = editor.EditValue(context, serviceProvider.Object, "image://"); Assert.Equal("MyTool", (string)item.Data.CustomTool); }
public void WhenCancelDialog_ThenReturnPreviousValue() { var editor = new ImageUriEditor(new Window()); picker.Setup(p => p.ShowDialog()).Returns(false); var value = editor.EditValue(context, serviceProvider.Object, "image://"); Assert.Equal("image://", value); }