Exemplo n.º 1
0
        public void TestRemoveRelation()
        {
            Relation testRelation = new Relation();

            testRelation.Id = -1;
            var source = new MemoryDataSource();

            source.AddRelation(testRelation);

            // test if the relation is actually there.
            Assert.AreEqual(testRelation, source.GetRelation(-1));

            // remove the relation.
            source.RemoveRelation(-1);

            // test if the relation is actually gone.
            Assert.IsNull(source.GetRelation(-1));
        }