Beispiel #1
0
        public void specify_all_the_primitive_properties_with_extension_method()
        {
            theStep.With(
                "Address1:1718 Elm Street,Address2:Unit A,City:Austin,StateOrProvince:TX,PostalCode:78703,TimeZone:CT,DistanceFromOffice:112.4,Country:United States");

            grammar.ConfigureSteps(x => { x.SetPropertiesOnCurrentObject <Address>(o => o.SetAllPrimitiveProperties()); });

            theAddress.Address1.ShouldEqual("1718 Elm Street");
            theAddress.Address2.ShouldEqual("Unit A");
            theAddress.City.ShouldEqual("Austin");
            theAddress.StateOrProvince.ShouldEqual("TX");
            theAddress.PostalCode.ShouldEqual("78703");
            theAddress.TimeZone.ShouldEqual("CT");
            theAddress.DistanceFromOffice.ShouldEqual(112.4);
        }
Beispiel #2
0
 private void ifTheVerificationIs(Action <ObjectVerificationExpression <Address> > action)
 {
     grammar.ConfigureSteps(x => { x.VerifyPropertiesOf(action); });
 }