public void MapNonMember_MapsThemToo()
        {
            var mapper = new TypedObjectMapper<TestDetails>()
                .Map(d => d.GetType().Name);
            
            var details = new TestDetails();
            var fields = mapper.GetFields(details);

            fields.DoesContain(Field("GetType().Name", details.GetType().Name));
        }
        public void Map_MapsOnlySpecificMembers()
        {
            var mapper = new TypedObjectMapper<TestDetails>()
                .Map(d => d.String);

            var details = new TestDetails { String = Some.String };
            var fields = mapper.GetFields(details);

            fields.DoesOnlyContain(Field("String", Some.String));
        }
        public void MapNonMember_MapsThemToo()
        {
            var mapper = new TypedObjectMapper <TestDetails>()
                         .Map(d => d.GetType().Name);

            var details = new TestDetails();
            var fields  = mapper.GetFields(details);

            fields.DoesContain(Field("GetType().Name", details.GetType().Name));
        }
        public void MapRemainingMembers_MapsRemainingMembers()
        {
            var mapper = new TypedObjectMapper<TestDetails>()
                .MapRemainingMembers();

            var details = new TestDetails { String = Some.String };
            var fields = mapper.GetFields(details);

            var allMembers = typeof (TestDetails).GetPublicPropertiesAndFields().Select(m => m.Name);

            fields.DoesContainKeys(allMembers);
        }
        public void Map_MapsOnlySpecificMembers()
        {
            var mapper = new TypedObjectMapper <TestDetails>()
                         .Map(d => d.String);

            var details = new TestDetails {
                String = Some.String
            };
            var fields = mapper.GetFields(details);

            fields.DoesOnlyContain(Field("String", Some.String));
        }
        public void MapRemainingMembers_MapsRemainingMembers()
        {
            var mapper = new TypedObjectMapper <TestDetails>()
                         .MapRemainingMembers();

            var details = new TestDetails {
                String = Some.String
            };
            var fields = mapper.GetFields(details);

            var allMembers = typeof(TestDetails).GetPublicPropertiesAndFields().Select(m => m.Name);

            fields.DoesContainKeys(allMembers);
        }