public void CreateDownloadIdParameter_WhenDirectionProvided_CreatesDownloadIdParameterWithDirection( ParameterDirection expected) { DbParameter actual = systemUnderTest.CreateDownloadIdParameter(databaseConnectionServiceMock, expected); actual.Received().Direction = expected; }
public void FileDownloadStarted_WhenInvoked_ReturnsDownloadId() { var dbParameter = Substitute.For <DbParameter>(); dbParameter.Value.Returns(100); databaseConnectionServiceMock.ClearSubstitute(); statsDownloadDatabaseParameterServiceMock.CreateDownloadIdParameter(databaseConnectionServiceMock) .Returns(dbParameter); InvokeFileDownloadStarted(); Assert.That(filePayload.DownloadId, Is.EqualTo(100)); }
private DbParameter CreateDownloadIdParameter(IDatabaseConnectionService databaseConnection, int downloadId) { return(statsDownloadDatabaseParameterService.CreateDownloadIdParameter(databaseConnection, downloadId)); }