Hmmm, just got back to this and seem to still be having trouble.
here's what I've tried
S2CPropertyMapService _service = new
S2CPropertyMapService(MockFor<IRepository>(),
MockFor<ISinglePropertyMapService>(), MockFor<ISaveEntityService>());
// i've also tried just mocking the concrete
S2CPropertyMapService and the interface ( IParentPropertyMapService )
to no avail
Services.Container.Configure(x =>
x.For<IParentPropertyMapService>().Add(_service).Named("SourceToChild"));
_map = new PropertyMap { GUID = Guid.NewGuid() };
_service.Expect(x =>
x.AddOrUpdateMapProperty(null)).IgnoreArguments().Return(new
PropertyMapContinuation { Success = true, Map = _map });
when I get to the point of setting my expectations it fails
I've also tried retrieving my object from the container then setting
the expectations on that as well. same result. Am I doing something
wrong?
R
On Jul 28, 2:27 pm, Raif <
reha...@gmail.com> wrote:
> Ah, I see.
> Thanks
> R
>
> On Jul 27, 2:39 pm, Jeremy Miller <
jeremydmil...@yahoo.com> wrote:
>
> >Raif,
>
> > You can get at the automocker's container itself like so to inject
> > other mocks (named and otherwise):
>
> > var mocker = new RhinoAutoMocker<MyClass>();
> > mocker.Container.Configure(x =>
> > x.For<IParentPropertyMapService>().Add( your mock
> > object ).Named( input.MapType );
>