public static void ToObject_Returns_Expected(SomeObject expected,
                                                     Vertex sut)
        {
            sut.Properties[nameof(SomeObject.BooleanProperty)] = new[] { new VertexPropertyValue {
                                                                             Value = expected.BooleanProperty
                                                                         } };
            sut.Properties[nameof(SomeObject.BooleanEnumerableProperty)] = expected.BooleanEnumerableProperty.Select(v => new VertexPropertyValue {
                Value = v
            }).ToList();
            sut.Properties[nameof(SomeObject.DecimalProperty)] = new[] { new VertexPropertyValue {
                                                                             Value = expected.DecimalProperty
                                                                         } };
            sut.Properties[nameof(SomeObject.DecimalEnumerableProperty)] = expected.DecimalEnumerableProperty.Select(v => new VertexPropertyValue {
                Value = v
            }).ToList();
            sut.Properties[nameof(SomeObject.IntegerProperty)] = new[] { new VertexPropertyValue {
                                                                             Value = expected.IntegerProperty
                                                                         } };
            sut.Properties[nameof(SomeObject.IntegerEnumerableProperty)] = expected.IntegerEnumerableProperty.Select(v => new VertexPropertyValue {
                Value = v
            }).ToList();
            sut.Properties[nameof(SomeObject.StringProperty)] = new[] { new VertexPropertyValue {
                                                                            Value = expected.StringProperty
                                                                        } };
            sut.Properties[nameof(SomeObject.StringEnumerableProperty)] = expected.StringEnumerableProperty.Select(v => new VertexPropertyValue {
                Value = v
            }).ToList();

            var result = sut.ToObject <SomeObject>();

            expected.Should().BeEquivalentTo(result);
        }
Ejemplo n.º 2
0
        public static void ToObject_Returns_Expected(SomeObject expected,
                                                     Edge sut)
        {
            sut.Properties[nameof(SomeObject.BooleanProperty)] = expected.BooleanProperty;
            sut.Properties[nameof(SomeObject.DecimalProperty)] = expected.DecimalProperty;
            sut.Properties[nameof(SomeObject.IntegerProperty)] = expected.IntegerProperty;
            sut.Properties[nameof(SomeObject.StringProperty)]  = expected.StringProperty;

            var result = sut.ToObject <SomeObject>();

            expected.Should().BeEquivalentTo(result);
        }