2011-03-17 03:05:49 +00:00
|
|
|
using Machine.Specifications;
|
|
|
|
using MonoStockPortfolio.Activites.EditPortfolioScreen;
|
|
|
|
using MonoStockPortfolio.Core.PortfolioRepositories;
|
|
|
|
using MonoStockPortfolio.Entities;
|
|
|
|
using Telerik.JustMock;
|
|
|
|
|
|
|
|
namespace MonoStockPortfolio.Tests.Presenters
|
|
|
|
{
|
|
|
|
public class EditPortfolioTests
|
|
|
|
{
|
|
|
|
protected static EditPortfolioPresenter _presenter;
|
|
|
|
protected static IPortfolioRepository _mockPortfolioRepository;
|
|
|
|
protected static IEditPortfolioView _mockEditPortfolioView;
|
|
|
|
|
|
|
|
Establish context = () =>
|
2011-03-20 03:21:12 +00:00
|
|
|
{
|
|
|
|
_mockPortfolioRepository = Mock.Create<IPortfolioRepository>();
|
|
|
|
Mock.Arrange(() => _mockPortfolioRepository.GetPortfolioById(999)).Returns(
|
|
|
|
new Portfolio(999) {Name = "Testing Portfolio!"});
|
2011-03-17 03:05:49 +00:00
|
|
|
|
2011-03-20 03:21:12 +00:00
|
|
|
_mockEditPortfolioView = Mock.Create<IEditPortfolioView>();
|
2011-03-17 03:05:49 +00:00
|
|
|
|
2011-03-20 03:21:12 +00:00
|
|
|
_presenter = new EditPortfolioPresenter(_mockPortfolioRepository);
|
|
|
|
};
|
2011-03-17 03:05:49 +00:00
|
|
|
}
|
|
|
|
}
|