public void AutoCleanUnsupportedCascadeStyle()
 {
     var hbmMapping = new HbmMapping();
     var hbm = new HbmManyToOne();
     var mapper = new ManyToOneMapper(null, hbm, hbmMapping);
     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 hbmMapping = new HbmMapping();
     var hbm = new HbmManyToOne();
     var mapper = new ManyToOneMapper(null, hbm, hbmMapping);
     mapper.Cascade(Cascade.Persist | Cascade.Remove);
     hbm.cascade.Split(',').Select(w => w.Trim()).Should().Contain("persist").And.Contain("delete");
 }