Beispiel #1
0
 public bool Equals(HtmlConventionsPreviewContext other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Equals(other.ModelType, ModelType));
 }
        public void should_build_property_paths_with_periods()
        {
            var prop = ReflectionHelper.GetProperty<SampleContextModel>(m => m.Child);
            var context = new HtmlConventionsPreviewContext(typeof(SampleContextModel).FullName, typeof (SampleContextModel),
                                                            new SampleContextModel(), new PropertyInfo[] { prop });

            _builder.Enrich(context, _model);

            _model
                .Type
                .ShouldEqual("{0}.{1}".ToFormat(context.ModelType.FullName, prop.Name));
        }
 public bool Equals(HtmlConventionsPreviewContext other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return Equals(other.ModelType, ModelType);
 }
 public void setup()
 {
     _builder = new PropertyLinksBuilder(new PropertySourceGenerator());
     _model = new HtmlConventionsPreviewViewModel();
     _context = ObjectMother.BasicPreviewContext();
 }
 public void setup()
 {
     _context = ObjectMother.BasicPreviewContext();
 }