public void RemoveTopic_MissingTopic_IsNotDirty() { var related = TopicFactory.Create("Topic", "Page"); var relationships = new NamedTopicCollection("Test"); relationships.Remove(related); Assert.IsFalse(relationships.IsDirty); }
public void RemoveTopic_MissingTopic_StaysDirty() { var relationships = new NamedTopicCollection("Test"); var related = TopicFactory.Create("Topic1", "Page"); var missing = TopicFactory.Create("Topic2", "Page"); relationships.Add(related); relationships.Remove(missing); Assert.IsTrue(relationships.IsDirty); }
public void RemoveTopic_IsDirty() { var relationships = new NamedTopicCollection("Test"); var related = TopicFactory.Create("Topic", "Page"); relationships.Add(related); relationships.IsDirty = false; relationships.Remove(related); Assert.IsTrue(relationships.IsDirty); }