I get the following error when I attempt to run my test. I've tried **`IgnoreArguments()`** , but that does not seem to do the trick. This exception is only thrown when I attempt **`mock.Ordered()`** if I do **`mock.Record()`** then it passes.

> 
> System.InvalidOperationException : Previous method
>  'IProductRepository.GetAllProducts();' requires a return value or an
>  exception to throw.
> 
> 
> 

---

```
 [Test]
        public void TestwithOrderedRecordsandPlayBack()
        {
            var mock = new MockRepository();
            var productRepository = mock.StrictMock<IProductRepository>();

            var product = new Grains
            {
                Name = "Wonder Bread",
                Category = "Grains"
            };

            IList list = new ArrayList();
            //Class under test
            var service = new ProductService(productRepository);

            using (mock.Ordered())
            {
                Expect.Call(productRepository
                    .GetAllProducts())
                    .IgnoreArguments()
                    .Return(new ArrayList());
                Expect.Call(()=>productRepository.SaveProduct(product));
            }

            using (mock.Playback())
            {
                list = service.GetAllProducts();
                service.SaveProduct(product);
            }
        }

```

---

Service call:

```
 public virtual IList GetAllProducts()
        {
            IList list = _productRepository.GetAllProducts();
            return list;
            //throw new System.Exception("Not implemented");
        }

public virtual IList GetAllProducts()
        {
            IList list = _productRepository.GetAllProducts();
            return list;
            //throw new System.Exception("Not implemented");
        }

```