Testing api for SQL based projections
Brainstorming
public class SqlProjectionScenarioBuilder
{
}
public interface ISqlProjectionScenarioInitialState
{
ISqlProjectionScenarioGivenState Given(IEnumerable<object> messages);
ISqlProjectionScenarioGivenState Given(object[] messages);
ISqlProjectionScenarioGivenState Given(object message);
}
public interface ISqlProjectionScenarioGivenState
{
ISqlProjectionScenarioGivenState Given(IEnumerable<object> messages);
ISqlProjectionScenarioGivenState Given(object[] messages);
ISqlProjectionScenarioGivenState Given(object message);
ISqlProjectionScenarioExpectState ExpectEmptyResultSet(SqlQueryCommand command);
ISqlProjectionScenarioExpectState ExpectNonEmptyResultSet(SqlQueryCommand command);
ISqlProjectionScenarioExpectState ExpectRowCount(SqlQueryCommand command, int count);
ISqlProjectionScenarioExpectState ExpectScalarValue(SqlQueryCommand command, object value);
}
public interface ISqlProjectionScenarioExpectState
{
ISqlProjectionScenarioExpectState ExpectEmptyResultSet(SqlQueryCommand command);
ISqlProjectionScenarioExpectState ExpectNonEmptyResultSet(SqlQueryCommand command);
ISqlProjectionScenarioExpectState ExpectRowCount(SqlQueryCommand command, int count);
ISqlProjectionScenarioExpectState ExpectScalarValue(SqlQueryCommand command, object value);
SqlProjectionScenario Build();
}
public interface IExpectation
{
VerificationResult Verify(ConnectedTransactionalSqlCommandExecutor executor);
Task<VerificationResult> VerifyAsync(ConnectedTransactionalSqlCommandExecutor executor);
}
public class VerificationResult
{
}
public class SqlProjectionScenario
{
}
Hi, have there been any developments for this topic?
Hi Jeremiah,
I'm afraid not. I've been slacking and also never been satisfied with whatever I've come up with so far for this. There's also other parts of the SQL related bits I'd like to ditch that have been holding me back on making any progress on this. On top of all that my focus has been moving away from SQL Server as the store to project into. Good thing you poked me, I'll give it another go because I truly believe this would be a nice supplement to what I'm offering now for the Connected version of Projac.
Thanks for the quick response, Yves!
This looks like a good starting point for what I need.