Ejemplo n.º 1
0
        public void CheckerFactoryRegisterTypeViaGeneric()
        {
            var cc = new CheckerConventions();

            cc.Convention <SampleClass>(CompareTarget.Ignore);

            Assert.That(cc.TypeConventions.CompareTarget.Convention(typeof(SampleClass)), Is.EqualTo(CompareTarget.Ignore));
        }
Ejemplo n.º 2
0
        public static void AssignTypeConventions(this CheckerConventions conventions)
        {
            // NB Must have this one to put base behaviour in suchs as Guid
            conventions.TypeConventions.InitializeTypeConventions();

            // NB Conventions must be after general type registrations if they are to apply.
            conventions.Convention(x => typeof(IIdentifiable).IsAssignableFrom(x), CompareTarget.Id);
        }
Ejemplo n.º 3
0
 public static void AssignPropertyInfoConventions(this CheckerConventions conventions)
 {
     //conventions.Convention(x => typeof(IIdentifiable).IsAssignableFrom(x), CompareTarget.Id);
     conventions.Convention((PropertyInfo x) => x.Name == "Ignore", CompareTarget.Ignore);
 }