public OpenAsyncReadOnlySession ( ) : IAsyncReadOnlySession | ||
Résultat | IAsyncReadOnlySession |
public WhenCallingOpenAsyncReadOnlySession_MultipleTimes() { var sessionFactory = new SessionFactory("SqlConnection", new Mock<IDbDriver>().Object, new Mock<ISqlDialect>().Object); this.readOnlyAsyncSession1 = sessionFactory.OpenAsyncReadOnlySession(); this.readOnlyAsyncSession2 = sessionFactory.OpenAsyncReadOnlySession(); }
public WhenCallingOpenAsyncReadOnlySession() { var mockDbDriver = new Mock<IDbDriver>(); mockDbDriver.Setup(x => x.CreateConnection()); var mockSqlDialect = new Mock<ISqlDialect>(); mockSqlDialect.Setup(x => x.SqlCharacters).Returns(this.sqlCharacters); var sessionFactory = new SessionFactory("SqlConnection", mockDbDriver.Object, mockSqlDialect.Object); this.readOnlyAsyncSession = sessionFactory.OpenAsyncReadOnlySession(); }