spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Василец Дмитрий <pronix.serv...@gmail.com>
Subject Re: Mock Cassandra DB Connection in Unit Testing
Date Thu, 29 Oct 2015 11:33:41 GMT
there is example how i mock mysql
import org.scalamock.scalatest.MockFactory
 val connectionMock = mock[java.sql.Connection]
 val statementMock = mock[PreparedStatement]
    (conMock.prepareStatement(_:
String)).expects(sql.toString).returning(statementMock)
    (statementMock.executeUpdate _).expects()


On Thu, Oct 29, 2015 at 12:27 PM, Priya Ch <learnings.chitturi@gmail.com>
wrote:

> Hi All,
>
>   For my  Spark Streaming code, which writes the results to Cassandra DB,
> I need to write Unit test cases. what are the available test frameworks to
> mock the connection to Cassandra DB ?
>

Mime
View raw message