this is what I would like to be able to do.
/// <summary>
/// Gets the session factory.
/// </summary>
/// <value>The session factory.</value>
public ISessionFactory SessionFactory
{
get
{
if (_sessionFactory == null)
{
#if(NUNIT)
_sessionFactory = Fluently.Configure()
.Database(SQLiteConfiguration.Standard
.UsingFile(DbFile)
.ShowSql())
.Mappings(m =>
m.FluentMappings.AddFromAssemblyOf<ForeignFormat>())
.ExposeConfiguration(BuildSchema)
.BuildSessionFactory();
#else
_sessionFactory = Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2005
.ConnectionString(c => c
.Server(".\\sqlexpress")
.Database("mPort")
.TrustedConnection())
.ShowSql()
)
.Mappings(m => m
.FluentMappings.AddFromAssemblyOf<ForeignFormat>())
.BuildSessionFactory();
#endif
}
return _sessionFactory;
}
}
is it possible to #if conditional if you are running a unit test?