public void ShouldIgnoreAPropertySetter()
        {
            var member = MemberCache
                         .GetTargetMembers(typeof(PublicProperty <long>))
                         .FirstOrDefault(m => m.Name.StartsWith("set_"));

            member.ShouldBeNull();
        }
        public void ShouldIgnoreAGetMethod()
        {
            var member = MemberCache
                         .GetTargetMembers(typeof(PublicGetMethod <string[]>))
                         .FirstOrDefault(m => m.Name == "Value");

            member.ShouldBeNull();
        }
        public void ShouldIgnoreANonPublicField()
        {
            var member = MemberCache
                         .GetTargetMembers(typeof(InternalField <List <byte> >))
                         .FirstOrDefault(m => m.Name == "Value");

            member.ShouldBeNull();
        }
        public void ShouldFindAPublicProperty()
        {
            var member = MemberCache
                         .GetTargetMembers(typeof(PublicProperty <byte>))
                         .FirstOrDefault(m => m.Name == "Value");

            member.ShouldNotBeNull();
            member.Type.ShouldBe(typeof(byte));
        }
        public void ShouldFindAPublicReadOnlySimpleTypeProperty()
        {
            var member = MemberCache
                         .GetTargetMembers(typeof(PublicReadOnlyProperty <long>))
                         .FirstOrDefault(m => m.Name == "Value");

            member.ShouldNotBeNull();
            member.Type.ShouldBe(typeof(long));
            member.IsWriteable.ShouldBeFalse();
        }
        public void ShouldFindAPublicSetMethod()
        {
            var member = MemberCache
                         .GetTargetMembers(typeof(PublicSetMethod <DateTime>))
                         .FirstOrDefault(m => m.Name == "SetValue");

            member.ShouldNotBeNull();
            member.Type.ShouldBe(typeof(DateTime));
            member.IsWriteable.ShouldBeTrue();
        }
        public void ShouldFindAPublicReadOnlyField()
        {
            var member = MemberCache
                         .GetTargetMembers(typeof(PublicReadOnlyField <IEnumerable <byte> >))
                         .FirstOrDefault(m => m.Name == "Value");

            member.ShouldNotBeNull();
            member.Type.ShouldBe(typeof(IEnumerable <byte>));
            member.IsWriteable.ShouldBeFalse();
        }
        public void ShouldFindAPublicField()
        {
            var member = MemberCache
                         .GetTargetMembers(typeof(PublicField <int>))
                         .FirstOrDefault(m => m.Name == "Value");

            member.ShouldNotBeNull();
            member.Type.ShouldBe(typeof(int));
            member.IsWriteable.ShouldBeTrue();
        }
        public void ShouldFindAPublicReadOnlyArrayField()
        {
            var member = MemberCache
                         .GetTargetMembers(typeof(PublicReadOnlyField <byte[]>))
                         .FirstOrDefault(m => m.Name == "Value");

            member.ShouldNotBeNull();
            member.Type.ShouldBe(typeof(byte[]));
            member.ElementType.ShouldBe(typeof(byte));
            member.IsWriteable.ShouldBeFalse();
        }
        public void ShouldFindAReadOnlyArrayProperty()
        {
            var member = MemberCache
                         .GetTargetMembers(typeof(PublicReadOnlyProperty <long[]>))
                         .FirstOrDefault(m => m.Name.StartsWith("Value"));

            member.ShouldNotBeNull();
            member.Type.ShouldBe(typeof(long[]));
            member.ElementType.ShouldBe(typeof(long));
            member.IsWriteable.ShouldBeFalse();
        }