public void TestCollectionProperty() { var foo = new Foo { Bazes = new[] { new Baz { Id = 2 }, new Baz { Id = 3 } } }; var bar = CreateSut()(foo, new string[0]); bar.Should().NotBeNull(); bar.Quxes.Should().NotBeNull(); bar.Quxes.Should().NotBeEmpty(); bar.Quxes.Count().Should().Be(foo.Bazes.Count()); bar.Quxes.Should().NotContainNulls(); bar.Quxes.First().Id.Should().Be(foo.Bazes.First().Id); bar.Quxes.Last().Id.Should().Be(foo.Bazes.Last().Id); }
public void TestWriteOnly() { var foo = new Foo { Name = "i am foo" }; var bar = CreateSut()(foo, new string[0]); bar.Should().NotBeNull(); bar.Name.Should().BeNullOrEmpty(); }
public void TestComponentProperty() { var foo = new Foo { Component = new Baz { Id = 1 } }; var bar = CreateSut()(foo, new string[0]); bar.Should().NotBeNull(); bar.Component.Should().NotBeNull(); bar.Component.Id.Should().Be(foo.Component.Id); }