Exemple #1
0
        public void include_private_property_should_work()
        {
            var methodInspector = new ConversationalMethodInspector(typeof(Baz), new PersistenceConversationalAttribute());

            methodInspector.GetMethods().Select(m => m.Name)
            .Should().Contain("set_SomePrivatePropertyIncluded");
        }
Exemple #2
0
        public void should_exclude_public_methods_that_are_excluded()
        {
            var aspect = new ConversationalMethodInspector(
                typeof(Bar2),
                new PersistenceConversationalAttribute());

            aspect.GetMethods().Any(m => m.Name == "DoSomethingElse").Should().Be.False();
        }
Exemple #3
0
        public void should_return_private_methods_that_contains_persistence_conversation_attribute()
        {
            var aspect = new ConversationalMethodInspector(
                typeof(Bar2),
                new PersistenceConversationalAttribute());

            aspect.GetMethods().First().Name.Should().Be.EqualTo("DoSomething");
        }
Exemple #4
0
        public void should_return_interface_method_implementation()
        {
            var aspect = new ConversationalMethodInspector(
                typeof(Bar),
                new PersistenceConversationalAttribute());

            aspect.GetMethods().Count().Should().Be.EqualTo(1);
        }
Exemple #5
0
        public void should_work_with_simple_method()
        {
            var aspect = new ConversationalMethodInspector(
                typeof(Foo),
                new PersistenceConversationalAttribute());

            aspect.GetMethods().Count().Should().Be.EqualTo(1);
        }
Exemple #6
0
        public void getmethods_doesnt_retrieve_inherited_methods()
        {
            var aspect = new ConversationalMethodInspector(
                typeof(BarBar),
                new PersistenceConversationalAttribute());

            aspect.GetMethods().Count().Should().Be.EqualTo(0);
        }
Exemple #7
0
        public void should_exclude_public_methods_when_the_aspect_is_excplit()
        {
            var aspect = new ConversationalMethodInspector(
                typeof(Foo),
                new PersistenceConversationalAttribute {
                MethodsIncludeMode = MethodsIncludeMode.Explicit
            });

            aspect.GetMethods().Should().Be.Empty();
        }
Exemple #8
0
        public void exclude_at_property_level_works()
        {
            var methodInspector = new ConversationalMethodInspector(typeof(Baz), new PersistenceConversationalAttribute());

            methodInspector.GetMethods().Select(m => m.Name).Should().Not.Contain("set_SomeProperty");
        }