public void DefaultNotPresentBehaviorIsBuild()
        {
            DependencyAttribute attribute = new DependencyAttribute("Foo");

            IParameter result = attribute.CreateParameter(typeof(object));

            DependencyParameter parameter = AssertHelper.IsType <DependencyParameter>(result);

            Assert.AreEqual(NotPresentBehavior.Build, parameter.NotPresentBehavior);
        }
        public void DefaultBuildKeyIsAnnotatedMemberType()
        {
            DependencyAttribute attribute = new DependencyAttribute();

            IParameter result = attribute.CreateParameter(typeof(object));

            DependencyParameter parameter = AssertHelper.IsType <DependencyParameter>(result);

            Assert.AreEqual <object>(typeof(object), parameter.BuildKey);
        }
        public void ReturnsDependencyParameter()
        {
            DependencyAttribute attribute = new DependencyAttribute("Foo");

            attribute.NotPresentBehavior = NotPresentBehavior.Throw;

            IParameter result = attribute.CreateParameter(typeof(object));

            DependencyParameter parameter = AssertHelper.IsType <DependencyParameter>(result);

            Assert.AreEqual <object>("Foo", parameter.BuildKey);
            Assert.AreEqual(NotPresentBehavior.Throw, parameter.NotPresentBehavior);
        }