mirror of
https://github.com/mgroves/MonodroidStockPortfolio.git
synced 2024-12-29 11:17:07 +00:00
26 lines
No EOL
989 B
C#
26 lines
No EOL
989 B
C#
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 = () =>
|
|
{
|
|
_mockPortfolioRepository = Mock.Create<IPortfolioRepository>();
|
|
Mock.Arrange(() => _mockPortfolioRepository.GetPortfolioById(999)).Returns(
|
|
new Portfolio(999) {Name = "Testing Portfolio!"});
|
|
|
|
_mockEditPortfolioView = Mock.Create<IEditPortfolioView>();
|
|
|
|
_presenter = new EditPortfolioPresenter(_mockPortfolioRepository);
|
|
};
|
|
}
|
|
} |