public void GroupViewModelConstructorTest()
 {
     GroupViewModel target = new GroupViewModel();
     Assert.IsNotNull(target);
     Assert.IsNotNull(target.GroupSelectionCommand);
     Assert.IsNotNull(target.ReferenceGroup);
 }
 public void GroupSelectionCommandTest()
 {
     GroupViewModel target = new GroupViewModel();
     ICommand actual = target.GroupSelectionCommand;
     Assert.IsNotNull(target);
     Assert.IsNotNull(actual);
 }
        public void ExecuteTest()
        {
            GroupViewModel groupViewModel = new GroupViewModel();
            groupViewModel.GroupSelectionChangedEvent += new EventHandler(GoupViewModelGroupSelectionChangedEvent);

            groupViewModel.Name = "NameBeforeEvent";

            GroupViewModel_Accessor.GroupSelectionHandler target = new GroupViewModel_Accessor.GroupSelectionHandler(groupViewModel);
            target.Execute(groupViewModel);
            Assert.AreEqual(groupViewModel.Name, "NameAfterEvent");
        }
 /// <summary>
 /// Builds the reference frame dropdown
 /// </summary>
 internal void BuildReferenceFrameDropDown()
 {
     if (this.layerDetailsViewModel != null && WWTManager.IsValidMachine(Common.Globals.TargetMachine.MachineIP.ToString(), true))
     {
         ICollection<Group> groups = WWTManager.GetAllWWTGroups(true);
         if (groups != null && groups.Count > 0)
         {
             GroupViewModel referenceGroup = new GroupViewModel();
             referenceGroup.Name = string.Empty;
             foreach (Group group in groups)
             {
                 group.IsExpanded = true;
                 referenceGroup.ReferenceGroup.Add(group);
             }
             this.layerDetailsViewModel.ReferenceGroups.Add(referenceGroup);
         }
     }
 }
Пример #5
0
 public GroupSelectionHandler(GroupViewModel groupViewModel)
 {
     this.parent = groupViewModel;
 }
 public void NameTest()
 {
     GroupViewModel target = new GroupViewModel();
     string expected = "GroupViewModelName";
     target.Name = expected;
     string actual = target.Name;
     Assert.AreEqual(expected, actual);
 }
 public void ReferenceGroupTest()
 {
     GroupViewModel groupViewModel = new GroupViewModel();
     Collection<Group> expected = groupViewModel.ReferenceGroup;
     Assert.IsNotNull(expected);
 }
 public void GroupViewModelGroupSelectionHandlerConstructorTest()
 {
     GroupViewModel groupViewModel = new GroupViewModel();
     GroupViewModel_Accessor.GroupSelectionHandler target = new GroupViewModel_Accessor.GroupSelectionHandler(groupViewModel);
     Assert.AreEqual(target.parent, groupViewModel);
 }
Пример #9
0
 public GroupSelectionHandler(GroupViewModel groupViewModel)
 {
     this.parent = groupViewModel;
 }