Esempio n. 1
0
        public void Resolves_WithCustom()
        {
            var resolver = new CustomResolver();
            var type     = typeof(Foo);
            var props    = resolver.ResolveProperties(type).ToArray();

            Assert.Equal(type.GetProperties().Skip(2).ToArray(), props);
        }
        public void Resolves_WithCustom()
        {
            // Arrange
            var resolver = new CustomResolver();
            var type     = typeof(Foo);

            // Act
            var props = resolver.ResolveProperties(type).ToArray();

            // Assert
            Assert.Collection(props,
                              x => Assert.Equal(x, type.GetProperty("String")),
                              x => Assert.Equal(x, type.GetProperty("Guid")),
                              x => Assert.Equal(x, type.GetProperty("Decimal")),
                              x => Assert.Equal(x, type.GetProperty("Double")),
                              x => Assert.Equal(x, type.GetProperty("Float")),
                              x => Assert.Equal(x, type.GetProperty("DateTime")),
                              x => Assert.Equal(x, type.GetProperty("DateTimeOffset")),
                              x => Assert.Equal(x, type.GetProperty("Timespan")),
                              x => Assert.Equal(x, type.GetProperty("Bytes"))
                              );
        }