public void ShouldGetShareInfo() { // Arrange this.shareTableRepository = Substitute.For <IShareTableRepository>(); int testId = 55; this.shareTableRepository.ContainsById(Arg.Is(testId)).Returns(true); SharesService sharesService = new SharesService(this.shareTableRepository); // Act var shareInfo = sharesService.GetShare(testId); // Assert this.shareTableRepository.Received(1).Get(testId); }