コード例 #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);
        }
コード例 #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);
        }