Projac icon indicating copy to clipboard operation
Projac copied to clipboard

Testing api for SQL based projections

Open yreynhout opened this issue 9 years ago • 3 comments

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
    {
    }

yreynhout avatar Mar 10 '16 23:03 yreynhout

Hi, have there been any developments for this topic?

jeremiahredekop avatar Sep 23 '16 13:09 jeremiahredekop

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.

yreynhout avatar Sep 23 '16 17:09 yreynhout

Thanks for the quick response, Yves!

This looks like a good starting point for what I need.

jeremiahredekop avatar Sep 23 '16 17:09 jeremiahredekop