コード例 #1
0
        public void TypeTest()
        {
            Assert.IsNull(Obj.Type);
            var t = RelationshipType.Random();

            Obj.TypeId = t.UniqueId;
            RelationshipTypes.Instance.AddRange(RelationshipTypes.Random());
            RelationshipTypes.Instance.Add(t);
            Assert.AreEqual(t, Obj.Type);
        }
コード例 #2
0
        public void RelationshipTypeTest()
        {
            Assert.IsNull(Obj.RelationshipType);
            var r = RelationshipType.Random();

            r.UniqueId = Obj.RelationshipTypeId;
            RelationshipTypes.Instance.Add(r);
            RelationshipTypes.Instance.AddRange(RelationshipTypes.Random());
            Assert.AreEqual(r, Obj.RelationshipType);
        }
コード例 #3
0
        [TestMethod] public void FindTest()
        {
            var s = GetRandom.String();

            RelationshipTypes.Instance.AddRange(RelationshipTypes.Random());
            Assert.IsNull(RelationshipTypes.Find(s));
            var t = RelationshipType.Random();

            t.UniqueId = s;
            RelationshipTypes.Instance.Add(t);
            Assert.AreEqual(t, RelationshipTypes.Find(s));
        }