public void should_stringify_pizza_type() { var pizzaType = new PizzaType {Name = "foo", Description = "baz"}; var result = stringifier.GetString(pizzaType); result.ShouldContain(pizzaType.Name); result.ShouldContain(pizzaType.Description); }
public void SetUp() { builder = new PizzaTypeEditorConvention(); pizzaType = new PizzaType { Id = new Guid(), Name = "Test", Description = "Test description" }; order = new PickupOrder { Id = new Guid(), PizzaType = pizzaType }; services = MockRepository.GenerateStub<IServiceLocator>(); repository = MockRepository.GenerateStub<IRepository>(); stringifier = new Stringifier(); repository.Stub(r => r.GetAll<PizzaType>()).Return(new List<PizzaType> { pizzaType }); services.Stub(l => l.GetInstance<IRepository>()).Return(repository); services.Stub(l => l.GetInstance<Stringifier>()).Return(stringifier); }