Re: Mock Cassandra DB Connection in Unit Testing

2015-10-29 Thread Adrian Tanase
s.datastax.com>" Subject: Re: Mock Cassandra DB Connection in Unit Testing One more question, if i have a function which takes RDD as a parameter, how do we mock an RDD ?? On Thu, Oct 29, 2015 at 5:20 PM, Priya Ch mailto:learnings.chitt...@gmail.com>> wrote: How do we do it for

Re: Mock Cassandra DB Connection in Unit Testing

2015-10-29 Thread Priya Ch
One more question, if i have a function which takes RDD as a parameter, how do we mock an RDD ?? On Thu, Oct 29, 2015 at 5:20 PM, Priya Ch wrote: > How do we do it for Cassandra..can we use the same Mocking ? > EmbeddedCassandra Server is available with CassandraUnit. Can this be used > in Spark

Re: Mock Cassandra DB Connection in Unit Testing

2015-10-29 Thread Priya Ch
How do we do it for Cassandra..can we use the same Mocking ? EmbeddedCassandra Server is available with CassandraUnit. Can this be used in Spark Code as well ? I mean with Scala code ? On Thu, Oct 29, 2015 at 5:03 PM, Василец Дмитрий wrote: > there is example how i mock mysql > import org.scalam

Re: Mock Cassandra DB Connection in Unit Testing

2015-10-29 Thread Василец Дмитрий
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 _).expe