コード例 #1
0
        public void GetAllBlockOfSharesTest()
        {
            // Arrange
            var blockOfSharesRepositoryMock = Substitute.For <IBlockOfSharesRepository>();
            var sut = new BlockOfSharesManager(blockOfSharesRepositoryMock);

            // Act
            sut.GetAllBlockOfShares();

            // Asserts
            blockOfSharesRepositoryMock.Received(1).GetAllBlockOfShares();
        }
コード例 #2
0
        public void ShouldGetAllBlockOfShares()
        {
            // Arrange
            var blockOfSharesRepositoryMock = Substitute.For <IBlockOfSharesRepository>();
            var clientRepositoryMock        = Substitute.For <IClientRepository>();
            var sharesRepositoryMock        = Substitute.For <ISharesRepository>();

            var sut = new BlockOfSharesManager(
                blockOfSharesRepositoryMock,
                clientRepositoryMock,
                sharesRepositoryMock);

            // Act
            sut.GetAllBlockOfShares();

            // Asserts
            blockOfSharesRepositoryMock.Received(1).GetAllBlockOfShares();
        }