Esempio n. 1
0
        public void TestGetLinkedEntitiesWithEmptyValue()
        {
            // arrange
            var parser = new MultiNodeTreePickerContentParser();

            // act
            var result = parser.GetLinkedEntities(null);

            // verify
            Assert.IsNotNull(result);
            var entities = result.ToList();

            Assert.AreEqual(0, entities.Count());
        }
Esempio n. 2
0
        public void TestGetLinkedEntitiesWithValue()
        {
            // arrange
            var parser = new MultiNodeTreePickerContentParser();

            // act
            var result = parser.GetLinkedEntities("100,101,104");

            // verify
            Assert.IsNotNull(result);
            var entities = result.ToList();

            Assert.AreEqual(3, entities.Count());

            Assert.IsTrue(entities.Exists(x => x.LinkedEntityType == LinkedEntityType.Document && x.Id == 100));
            Assert.IsTrue(entities.Exists(x => x.LinkedEntityType == LinkedEntityType.Document && x.Id == 101));
            Assert.IsTrue(entities.Exists(x => x.LinkedEntityType == LinkedEntityType.Document && x.Id == 104));
        }