Ejemplo n.º 1
0
        public void WithValidatorMethodTest()
        {
            OperationsHeuristic heuristic = new OperationsHeuristic();
            Type type = typeof(WithValidator);
            MethodInfo method = type.GetMethod("SomethingIsValid");

            bool selectable = heuristic.IsSelectable(method);
            Assert.That(selectable, Is.True);
        }
Ejemplo n.º 2
0
        public void WithNoOperationsTest()
        {
            OperationsHeuristic heuristic = new OperationsHeuristic();
            Type type = typeof(Simple);
            MethodInfo[] methods = type.GetMethods();

            bool selectable = heuristic.IsSelectable(methods[0]);
            Assert.That(selectable, Is.False);
        }