public void GetEnumerator_WhenTheStructHasInstanceProperties_TheyAreReturned()
        {
            var propertyIterator = new SetInstancePropertyIterator<SetPropertyTestStruct>();

            string[] propertyNames = propertyIterator.Select(p => p.Name).OrderBy(p => p).ToArray();

            var expectedNames = new[] { "PropInt", "PropDouble", "PropAuto" }.OrderBy(p => p).ToArray();

            Assert.Equal(expectedNames, propertyNames);
        }
        public void GetEnumerator_WhenStructPropertyIsReturned_ItsInfoIsCorrect(string propertyName, Type propertyType)
        {
            var propertyIterator = new SetInstancePropertyIterator<SetPropertyTestStruct>();

            Type propertyReturnType = propertyIterator.First(p => p.Name.Equals(propertyName)).PropertyType;

            Assert.Equal(propertyType, propertyReturnType);
        }
        public void GetEnumerator_WhenTheClassHasInstanceProperties_TheyAreReturned()
        {
            var propertyIterator = new SetInstancePropertyIterator<SetPropertyTest>();

            string[] propertyNames = propertyIterator.Select(p => p.Name).OrderBy(p => p).ToArray();

            var expectedNames = new[] { "PropInt", "PropDouble", "PropByte", "PropShort", "PropString", "PropLong", "PropDecimal", "PropFloat", "PropAuto" }
               .OrderBy(p => p).ToArray();

            Assert.Equal(expectedNames.OrderBy(p => p), propertyNames.OrderBy(p => p));
        }