public CanHandle ( |
||
configuration | The configuration. | |
context | Context | The context. |
Résultat | bool |
public void CanHandle_ConfigIsNodeAndClassMapped_ReturnsTrue() { //Assign var config = new SitecoreNodeConfiguration(); var mapper = new SitecoreNodeMapper(); //Act var result = mapper.CanHandle(config, null); //Assert Assert.IsTrue(result); }
public void CanHandle_ConfigIsNodeAndClassNotMapped_ReturnsTrueOndemand() { //Assign var config = new SitecoreNodeConfiguration(); var context = Context.Create(Utilities.CreateStandardResolver()); var mapper = new SitecoreNodeMapper(); config.PropertyInfo = typeof (Stub).GetProperty("StubNotMapped"); context.Load(new SitecoreAttributeConfigurationLoader("Glass.Mapper.Sc.Integration")); //Act var result = mapper.CanHandle(config, context); //Assert Assert.IsTrue(result); }