public EditableContentPropertySpecContext() { EditableContent = new EditableContentProperty <object>(DisplayContent, EditContent); EditableContent.EditStarted += (s, e) => EditStartedRaised = e.DisplayContent == DisplayContent.Value.Value && e.EditContent == EditContent.Value.Value; EditableContent.EditCompleted += (s, e) => EditCompletedRaised = e.DisplayContent == DisplayContent.Value.Value && e.EditContent == EditContent.Value.Value; EditableContent.EditCanceled += (s, e) => EditCanceledRaised = e.DisplayContent == DisplayContent.Value.Value && e.EditContent == EditContent.Value.Value; }
void Ex03() { When("the display content that is not null and the edit content that is null is specified to the constructor", () => Property = new EditableContentProperty <object>(DisplayContent, null)); Then <ArgumentNullException>($"{typeof(ArgumentNullException)} should be thrown"); }
void Ex01() { When("the display content that is not null and the edit content that is not null is specified to the constructor", () => Property = new EditableContentProperty <object>(DisplayContent, EditContent)); Then("the content of the editable content property should be the display content", () => Property.Content.Value == DisplayContent); }