コード例 #1
0
 public void PartGetReturnsFieldWithName()
 {
     var contentItem = _manager.New(DefaultAlphaName);
     var part = contentItem.As<FlavoredPart>();
     var field = new Phi();
     part.Weld(field);
     var phi = part.Get(typeof(Phi), "Phi");
     var phi2 = part.Get(typeof(Phi), "Phi2");
     Assert.That(phi.Name, Is.EqualTo("Phi"));
     Assert.That(phi2, Is.Null);
 }
コード例 #2
0
 public void FieldsCanBeWeldIntoParts()
 {
     var contentItem = _manager.New(DefaultAlphaName);
     var part = contentItem.As<FlavoredPart>();
     var field = new Phi();
     part.Weld(field);
     Assert.That(part.Has(typeof(Phi), "Phi"));
 }