public void Constructor_ShouldCallExplorerBarItemsFactory_ToCreateLogicalBranchExplorerBarItem() { var logicalBranch = CreateLogicalBranch(); Init(logicalBranch); _explorerBarItemsRepository.Received().CreateRootBranchItem(logicalBranch, _explorerBar); }
public void Constructor_ShouldUseTheExplorerBarItemsFactoryToCreateA_QaBranchExplorerBarItem() { var qaExplorerBarItem = ExplorerBarItemBuilder.ExplorerBarItem().Build(); var qaBranch = Substitute.For <IQaBranch>(); _logicalBranch.GetQaBranch().Returns(qaBranch); _explorerBarItemsRepository.CreateQABranchItem(qaBranch).Returns(qaExplorerBarItem); var logicalBranchItem = CreateLogicalBranchItem(); _explorerBarItemsRepository.Received().CreateQABranchItem(qaBranch); }