public void SetUp() { _remotionReflector = new Reflectors.NewMixinDependenciesReflector(); var mixinConfiguration = MixinConfiguration.BuildNew() .ForClass <TargetClass1> () .AddMixin <Mixin1> () .BuildConfiguration(); _targetClassDefinition = TargetClassDefinitionFactory.CreateTargetClassDefinition(mixinConfiguration.ClassContexts.First()); _mixinDefinition = _targetClassDefinition.GetMixinByConfiguredType(typeof(Mixin1)); }
public void GetTargetClassDefinition() { var mixinConfiguration = MixinConfiguration.BuildNew() .ForClass <TargetClass1> ().AddMixin <Mixin1> () .BuildConfiguration(); var reflectedOutput = _remotionReflector.GetTargetClassDefinition(typeof(TargetClass1), new ReflectedObject(mixinConfiguration), new ReflectedObject(mixinConfiguration.ClassContexts.GetWithInheritance(typeof(TargetClass1)))); var expectedOutput = TargetClassDefinitionFactory.CreateTargetClassDefinition(mixinConfiguration.ClassContexts.First()); Assert.That(reflectedOutput.To <TargetClassDefinition> (), Is.InstanceOf(typeof(TargetClassDefinition))); Assert.That(reflectedOutput.To <TargetClassDefinition> ().FullName, Is.EqualTo(expectedOutput.FullName)); }