public void FeedTest( [Values(FeedFormat.Atom, FeedFormat.Rss)] FeedFormat format) { _feedServiceMock.Expect(m => m.CreateFeed(format, TestedController.Url)).Return(_syndicationFeedFormaterMock); _syndicationFeedFormaterMock.Expect(m => m.WriteTo(null)).IgnoreArguments() .WhenCalled(c => ((XmlWriter)c.Arguments[0]).WriteRaw("<feed/>")); var result = TestedController.GetFeed(format); VerifyContentResult(result, "text/xml", "<feed/>"); }