public void TestGetLinkedEntitiesWithEmptyValue() { // arrange var parser = new MultiNodeTreePickerMediaParser(); // act var result = parser.GetLinkedEntities(null); // verify Assert.IsNotNull(result); var entities = result.ToList(); Assert.AreEqual(0, entities.Count()); }
public void TestGetLinkedEntitiesWithValue() { // arrange var parser = new MultiNodeTreePickerMediaParser(); // 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.Media && x.Id == 100)); Assert.IsTrue(entities.Exists(x => x.LinkedEntityType == LinkedEntityType.Media && x.Id == 101)); Assert.IsTrue(entities.Exists(x => x.LinkedEntityType == LinkedEntityType.Media && x.Id == 104)); }