Example #1
0
        public void IsShareExistShareTypeTest()
        {
            // Arrange
            var shareRepositoryMock = Substitute.For <ISharesRepository>();

            var sut = new ShareManager(shareRepositoryMock);

            string shareType = "Umbrella";

            // Act
            sut.IsShareExist(shareType);

            // Asserts
            shareRepositoryMock.Received(1).IsShareExist(Arg.Is <string>(shareType));
        }
Example #2
0
        public void IsShareExistTest()
        {
            // Arrange
            var shareRepositoryMock = Substitute.For <ISharesRepository>();

            var sut = new ShareManager(shareRepositoryMock);

            int shareID = 135;

            // Act
            sut.IsShareExist(shareID);

            // Asserts
            shareRepositoryMock.Received(1).IsShareExist(Arg.Is <int>(shareID));
        }