Ejemplo n.º 1
0
        public void should_set_property()
        {
            dynamic countryBuilder = new DynamicFixtureBuilder <Country>();

            countryBuilder.Name = "China";
            Country country = countryBuilder.Build();

            Assert.Equal("China", country.Name);
        }
Ejemplo n.º 2
0
        public void should_set_property_with_derived_instance()
        {
            dynamic builder = new DynamicFixtureBuilder <Owner>();

            builder.Pet = new Cat("Mocha");

            Owner owner = builder.Build();

            Assert.Equal("Mocha", owner.Pet.Name);
        }
Ejemplo n.º 3
0
        public void should_set_long_property_with_int_value()
        {
            dynamic countryBuilder = new DynamicFixtureBuilder <Country>();

            countryBuilder.Id = 3;

            Country country = countryBuilder.Build();

            Assert.Equal(3, country.Id);
        }