public virtual void SetUp() { MappingInfo from = MappingInfo.From(typeof(Cargo).Assembly, typeof(HibernateRepository <>).Assembly); InitializeNHibernateAndIoC(PersistenceFramwork, RhinoContainerConfig, DatabaseEngine.SQLite, from); CurrentContext.CreateUnitOfWork(); LoadData(); }
public void TestThatNHibernateInitializationAwareIsCalled() { NHInitAwareMock mock = new NHInitAwareMock(); mock.ConfiguredWasCalled = 0; mock.InitializedWasCalled = 0; InitializeNHibernateAndIoC(FrameworkToTest, WindsorFilePath, DatabaseEngine.SQLite, ":memory:", MappingInfo.From().SetNHInitializationAware(mock)); Assert.AreEqual(1, mock.BeforeInitializationCalled); Assert.AreEqual(1, mock.ConfiguredWasCalled); Assert.AreEqual(1, mock.InitializedWasCalled); }
/// <summary> /// 테스트에 쓰일 NHibernate용 Entity가 정의된 Assembly에서 매핑 정보를 반환합니다. /// </summary> /// <example> /// <code> /// return MappingInfo.From(typeof(User).Assembly, typeof(FluentProject).Assembly); /// </code> /// </example> protected virtual MappingInfo GetMappingInfo() { // return MappingInfo.From(typeof(IActor).Assembly); return(MappingInfo.From(Assembly.GetExecutingAssembly(), typeof(NSoft.NFramework.Data.NHibernateEx.Domain.Company).Assembly)); }
/// <summary> /// 테스트에 쓰일 NHibernate용 Entity가 정의된 Assembly에서 매핑 정보를 반환합니다. /// </summary> /// <example> /// <code> /// return MappingInfo.From(typeof(User).Assembly, typeof(Project).Assembly); /// </code> /// </example> protected virtual MappingInfo GetMappingInfo() { // return MappingInfo.From(typeof(IActor).Assembly); return(MappingInfo.From(Assembly.GetExecutingAssembly())); }
protected override MappingInfo GetMappingInfo() { return(MappingInfo.From(typeof(Parent).Assembly)); }
protected override MappingInfo GetMappingInfo() { return(MappingInfo.From(Assembly.GetExecutingAssembly(), typeof(Domain.Parent).Assembly)); }