Skip to content

Testing api for SQL based projections #19

@yreynhout

Description

@yreynhout

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions