public void Constructor_DoesNotCreatePlaceholder_OrSetChildren_WhenMarkedAsChildless() { var sut = new TestTreeViewItemViewModel(Services, childless: true); Assert.IsNull(sut.LoadingPlaceholder); Assert.IsNull(sut.Children); }
public void TestInit() { RenewMockServices(); _collpasedTvivm = new TestTreeViewItemViewModel(Services); _expandedTvivm = new TestTreeViewItemViewModel(Services) { IsExpanded = true, }; // ignore first mock task invocation caused by initial expansion MockThreadingService.Invocations.Clear(); }
public void Constructor_Initializes() { var sut = new TestTreeViewItemViewModel(Services); Assert.AreSame(Services, sut.Services); Assert.IsNotNull(sut.CloudFoundryService); Assert.IsFalse(sut.IsLoading); /* loading placeholder gets instantiated */ Assert.IsNotNull(sut.LoadingPlaceholder); Assert.AreEqual(TreeViewItemViewModel._defaultLoadingMsg, sut.LoadingPlaceholder.DisplayText); /* children set to loading placeholder */ Assert.AreEqual(1, sut.Children.Count); Assert.AreEqual(sut.LoadingPlaceholder, sut.Children[0]); }