public void WhenRegisteredAsComponentThenIsRegistered() { var inspector = new ExplicitlyDeclaredModel(); inspector.AddAsComponent(typeof(MyComponent)); inspector.IsComponent(typeof(MyComponent)).Should().Be.True(); }
public void WhenRegisteredAsComponentThenIsRegistered() { var inspector = new ExplicitlyDeclaredModel(); inspector.AddAsComponent(typeof(MyComponent)); Assert.That(inspector.IsComponent(typeof(MyComponent)), Is.True); }
public void WhenPropertyUsedAsComposedIdThenRegister() { var inspector = new ExplicitlyDeclaredModel(); var mapper = new ModelMapper(inspector); mapper.Class<MyClass>(map => map.ComponentAsId(x => x.Id)); inspector.IsPersistentId(For<MyClass>.Property(x => x.Id)).Should().Be.True(); inspector.IsPersistentProperty(For<MyClass>.Property(x => x.Id)).Should().Be.True(); inspector.IsComponent(typeof(IMyCompo)).Should().Be.True(); }
bool IModelInspector.IsComponent(System.Type type) { bool declaredResult = declaredModel.IsComponent(type); return(isComponent(type, declaredResult)); }