public void SetUp() { _oAuthUserOne = RMM.GenerateStub<IOAuthUser>(); _oAuthUserOne.Id = "Id1"; _oAuthUserOne.UserName = "******"; _oAuthUserOne.FullName = "User One Of America"; _oAuthUserOne.AccessToken = "72157626737672178-oneoneoneoneone1"; _oAuthUserOne.AccessTokenSecret = "111111111111111"; _oAuthService = RMM.GenerateStub<IOAuthService>(); _oAuthService.Stub(s => s.GetOAuthAuthenticationUrl(null)).IgnoreArguments().Return(OAuthURL); _oAuthService.Stub(s => s.GetOAuthUser(@"72157626737672178-oneoneoneoneone1", @"5d1b96a26b494074")).Return(_oAuthUserOne); _userOneTags = new List<string> { "children", "school", "parents" }; _photoOne = RMM.GenerateStub<IPhoto>(); _photoOne.Id = @"PhotoIdOne"; _photoOne.Name = @"PhotoIdOne"; _photoOne.LargeUrl = @"http://www.flickr.com/large/one.jpg"; _photoOne.ThumbNailUrl = @"http://www.flickr.com/tn/one.jpg"; _photoOne.Owner = _oAuthUserOne; _photoOne.Tags = new List<string> { "children", "school" }; _photoTwo = RMM.GenerateStub<IPhoto>(); _photoTwo.Id = @"PhotoIdTwo"; _photoTwo.Name = @"PhotoIdTwo"; _photoTwo.LargeUrl = @"http://www.flickr.com/large/two.jpg"; _photoTwo.ThumbNailUrl = @"http://www.flickr.com/tn/two.jpg"; _photoTwo.Owner = _oAuthUserOne; _photoTwo.Tags = new List<string> { "parents" }; _photoThree = RMM.GenerateStub<IPhoto>(); _photoThree.Id = @"PhotoIdThree"; _photoThree.Name = @"PhotoIdThree"; _photoThree.LargeUrl = @"http://www.flickr.com/large/three.jpg"; _photoThree.ThumbNailUrl = @"http://www.flickr.com/tn/three.jpg"; _photoThree.Owner = _oAuthUserOne; _photoThree.Tags = new List<string> { "parents", "school" }; _photosUserOne = new List<IPhoto> { _photoOne, _photoTwo, _photoThree }; _photoService = RMM.GenerateMock<IPhotoService>(); _photoService.Stub(s => s.GetPhotos(_oAuthUserOne, String.Empty)).Return(_photosUserOne); _photoService.Stub(s => s.GetPhotos(_oAuthUserOne, "school")).Return(_photosUserOne.Where(p => p.Tags.Contains("school"))); _photoService.Stub(s => s.GetAllTags(_oAuthUserOne)).Return(_userOneTags); _builder = new TestControllerBuilder(); _controller = new HomeController(); _builder.InitializeController(_controller); ObjectFactory.Inject<IOAuthService>(_oAuthService); ObjectFactory.Inject<IPhotoService>(_photoService); }