public void T2()
        {
            INestedInterfacePerson person = Auto.Make <INestedInterfacePerson>().Object;
            var i = person.GenericMethod <string, string>("arg1", "arg2");

            Assert.That(person, Is.Not.Null);
            Assert.That(i, Is.EqualTo("string"));
        }
        public void T1()
        {
            INestedInterfacePerson person = Auto.Make <INestedInterfacePerson>().Object;
            var i = person["string", 1];

            Assert.That(person, Is.Not.Null);
            Assert.That(i, Is.EqualTo(int.MaxValue));
        }
        public void T8()
        {
            INestedInterfacePerson person = Auto.Make <INestedInterfacePerson>().Object;
            var i = person.ParentGenericMethod <string, Person>("arg1", "arg2");

            Assert.That(person, Is.Not.Null);
            Assert.That(person.FirstName, Is.EqualTo("FirstName"));
            Assert.That(i, Is.Not.Null);
            Assert.That(i.FirstName, Is.EqualTo("FirstName"));
        }
        public void T7()
        {
            INestedInterfacePerson person = Auto.Make <INestedInterfacePerson>().Object;
            var i = person.ParentProp;

            Assert.That(person, Is.Not.Null);

            Assert.That(i, Is.Not.Null);
            Assert.That(i, Is.EqualTo("string"));
        }
        public void T4()
        {
            INestedInterfacePerson person = Auto.Make <INestedInterfacePerson>().Object;
            var i = person.BasicMethod(1);

            Assert.That(person, Is.Not.Null);

            Assert.That(i, Is.Not.Null);
            Assert.That(i, Is.EqualTo("string"));
        }
        public void T6()
        {
            Auto.Configure.With("Global Config");

            INestedInterfacePerson person = Auto.Make <INestedInterfacePerson>().With("Instance Config").Object;
            var i = person.BasicMethod(1);

            Assert.That(person, Is.Not.Null);
            Assert.That(person.FirstName, Is.EqualTo("Instance Config"));

            // methods return values do not respect instance config, but do obey global config
            Assert.That(i, Is.EqualTo("Global Config"));
        }