public void InterceptorOnSaveTest() { var auditRepo = new Mock<IAuditLogRepository>(); User editingPerson = new User(); AuditInterceptor interceptor = new AuditInterceptor(editingPerson); interceptor.LogRepo = auditRepo.Object; object [] state = new object [1] {1}; string [] propertyNames = new string [1] {"testProperty"}; var iType = new Mock<NHibernate.Type.IType>(); NHibernate.Type.IType [] types = new NHibernate.Type.IType [1] {iType.Object}; Part p = new Part(); interceptor.OnSave (p, 1, state, propertyNames, types); auditRepo.Verify(_ => _.Save(It.IsAny<AuditLog>()), Times.Once()); }
public void InitializeJointCut(Part part1, Part part2) { this.part1 = part1; this.part2 = part2; }
public JointCutDialog(Part part1, Part part2) :this() { this.InitializeJointCut(part1, part2); }