public void Create_ShouldReturnSqliteConnectionInstance_WhenRequestTypeIsSqliteConnection( Mock <ISpecimenContext> contextMock, SqliteConnectionBuilder builder) { var noSpecimen = builder.Create(typeof(SqliteConnection), contextMock.Object); noSpecimen.Should().BeOfType <SqliteConnection>(); }
public void Create_ShouldThrowArgumentException_WhenSpecimenContextIsNull( SqliteConnectionBuilder builder) { Action act = () => builder.Create(typeof(SqliteConnection), null); act.Should().ThrowExactly <ArgumentNullException>(); }
public void Create_ShouldCreateSqliteConnection_WithConnectionString_WhenRequestTypeIsSqliteConnection( Mock <ISpecimenContext> contextMock, SqliteConnectionBuilder builder) { var connection = builder.Create(typeof(SqliteConnection), contextMock.Object); connection.As <SqliteConnection>().ConnectionString.Should().Be("DataSource=:memory:"); }
public void Create_ShouldReturnNoSpecimen_WhenRequestTypeNotSqliteConnection( Mock <ISpecimenContext> contextMock, SqliteConnectionBuilder builder) { var noSpecimen = builder.Create(typeof(string), contextMock.Object); noSpecimen.Should().BeOfType <NoSpecimen>(); }