public void SuspendableViewGetNodeReturnsInjectedGetNodesSuspendableView() { var expected = Mock.Of <ICalculationNode>(); var stat = Mock.Of <IStat>(); var path = PathDefinition.MainPath; var graphCollection = Mock.Of <IStatGraphCollection>( c => c.GetOrAdd(stat).GetNode(new NodeSelector(NodeType.Total, path)).SuspendableView == expected); var sut = new SuspendableViewNodeRepository(graphCollection); var actual = sut.GetNode(stat, NodeType.Total, path); Assert.AreSame(expected, actual); }