Rating: No reviews yet
Downloads: 0
Change Set: 42088
Released: May 18, 2016
Updated: May 18, 2016 by define
Dev status: Stable Help Icon

Available Downloads

There are no downloads associated with this release.

Release Notes

Support for manually injecting array of dependencies

        public void WhenInjectingDependencyArrayManuallyNoMockShouldBeCreated()
            var instance = new IWriter[1];
            instance.SetValue(new NullWriter(),0);

            var autoMocker = new RhinoAutoMocker<CustomerUpdater>((object)instance);
            autoMocker.Get<ICustomerDataProvider>().Expect(x => x.GetCustomer(0)).IgnoreArguments().Return(new CustomerItem());

            autoMocker.ClassUnderTest.UpdateCustomerName(1, "Frank", "frank@somecompany.com");

            var dummyLogWriter = (IWriter[])autoMocker.Get<IWriter[]>();

            Assert.AreEqual(dummyLogWriter.First().GetHashCode() , instance[0].GetHashCode());


Reviews for this release

No reviews yet for this release.