public void ConstructorInitialisesListWithChildren()
 {
     var children = new[]
                        {
                            new ServerItem(),
                            new ServerItem()
                        };
     var list = new ServerItemList(children);
     CollectionAssert.AreEqual(children, list.Children);
 }
예제 #2
0
        public virtual Messages.ServerItemList ListChildren(Messages.Blank request)
        {
            var serverItems = this.Children
                              .Select(p => new Messages.ServerItem
            {
                Description = p.Description,
                DisplayName = p.Name,
                Urn         = p.UniversalName
            });
            var response = new Messages.ServerItemList(serverItems);

            return(response);
        }
예제 #3
0
 public virtual Messages.ServerItemList ListChildren(Messages.Blank request)
 {
     var serverItems = this.Children
         .Select(p => new Messages.ServerItem
                          {
                              Description = p.Description,
                              DisplayName = p.Name,
                              Urn = p.UniversalName
                          });
     var response = new Messages.ServerItemList(serverItems);
     return response;
 }
 public void DefaultConstructorInitialisesEmptyList()
 {
     var list = new ServerItemList();
     CollectionAssert.IsEmpty(list.Children);
 }