public void AutoCleanUnsupportedCascadeStyle() { var hbm = new HbmOneToOne(); var mapper = new OneToOneMapper(null, hbm); mapper.Cascade(Cascade.Persist | Cascade.DeleteOrphans | Cascade.Remove); hbm.cascade.Split(',').Select(w => w.Trim()).All(w=> w.Satisfy(cascade=> !cascade.Contains("orphan"))); }
public void AssignCascadeStyle() { var hbm = new HbmOneToOne(); var mapper = new OneToOneMapper(null, hbm); mapper.Cascade(Cascade.Persist | Cascade.Remove); hbm.cascade.Split(',').Select(w=> w.Trim()).Should().Contain("persist").And.Contain("delete"); }