Example #1
0
    public void RemoveTopic_MissingTopic_IsNotDirty() {

      var related               = TopicFactory.Create("Topic", "Page");
      var relationships         = new NamedTopicCollection("Test");

      relationships.Remove(related);

      Assert.IsFalse(relationships.IsDirty);

    }
Example #2
0
    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);

    }
Example #3
0
    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);

    }