Exemplo n.º 1
0
		protected override void Establish_context()
		{
			base.Establish_context();

			_sut = Container.Create<TalkPlugin>();

			_post = MockRepository.GenerateStub<DataBuddyBase>();

			Mocks.ReplayAll();
		}
Exemplo n.º 2
0
		protected override void Establish_context()
		{
			base.Establish_context();

			_sut = Container.Create<TalkPlugin>();
			_sut.CategoryName = "Talk category";

			_post = new Post();

			IoC.Resolve<IPostRepository>().Stub(x => x.GetCategoryNameOf(_post)).Return("Some other category");
			IoC.Resolve<ITalkValidator>()
				.Expect(x => x.Validate(_post))
				.Return(null)
				.Repeat.Never();

			Mocks.ReplayAll();
		}
Exemplo n.º 3
0
		protected override void Establish_context()
		{
			base.Establish_context();

			_sut = Container.Create<TalkPlugin>();
			_sut.CategoryName = "Talk category";

			_post = new Post();

			IoC.Resolve<IPostRepository>().Stub(x => x.GetCategoryNameOf(_post)).Return(_sut.CategoryName);
			IoC.Resolve<ITalkValidator>().Stub(x => x.Validate(_post)).Return(new ValidationReport
			                                                                   {
			                                                                   	new ValidationError("something"),
			                                                                   	new ValidationError("some other thing")
			                                                                   });

			Mocks.ReplayAll();
		}