Dev2.Core.Tests.DebugOutputViewModelTest.DebugOutputViewModel_Append_ContentIsDebugState C# (CSharp) Method

DebugOutputViewModel_Append_ContentIsDebugState() public method

public DebugOutputViewModel_Append_ContentIsDebugState ( System.Guid contentID, System.Guid contentParentID, string displayName ) : void
contentID System.Guid
contentParentID System.Guid
displayName string
return void
        void DebugOutputViewModel_Append_ContentIsDebugState(Guid contentID, Guid contentParentID, string displayName)
        {
            //------------Setup for test--------------------------
            var envRepo = GetEnvironmentRepository();
            var viewModel = new DebugOutputViewModel(new Mock<IEventPublisher>().Object, envRepo, new Mock<IDebugOutputFilterStrategy>().Object);

            var content = new DebugState { DisplayName = displayName, ID = contentID, ParentID = contentParentID, StateType = StateType.All, ActivityType = ActivityType.Step, SessionID = viewModel.SessionID };

            //------------Execute Test---------------------------
            viewModel.Append(content);

            //------------Assert Results-------------------------
            Assert.AreEqual(1, viewModel.ContentItemCount);
            Assert.AreEqual(1, viewModel.RootItems.Count);

            var child = viewModel.RootItems[0];
            Assert.AreEqual(0, child.Depth);
            Assert.IsNull(child.Parent);
            Assert.IsFalse(child.IsExpanded);
        }
DebugOutputViewModelTest