本文整理汇总了C#中Moq.Mock.SetupAllProperties方法的典型用法代码示例。如果您正苦于以下问题:C# Moq.Mock.SetupAllProperties方法的具体用法?C# Moq.Mock.SetupAllProperties怎么用?C# Moq.Mock.SetupAllProperties使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Moq.Mock
的用法示例。
在下文中一共展示了Moq.Mock.SetupAllProperties方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Setup
public void Setup()
{
m_MockCategoryControl = new Moq.Mock<ICategoryControl>();
m_MockCategoryControl.SetupAllProperties();
m_MockSerieControl = new Moq.Mock<ISerieControl>();
m_MockSerieControl.SetupAllProperties();
m_MockFigurControl = new Moq.Mock<IFigurControl>();
m_MockFigurControl.SetupAllProperties();
}
示例2: after_initialized
public after_initialized()
{
_view = new Moq.Mock<IAccountListingView>();
_view.SetupAllProperties();
var accountService = new Moq.Mock<IAccountService>();
var transactionList = GetTransactionList();
accountService.Setup(c => c.GetAllWithTransactions()).Returns(transactionList);
_presenter = new AccountListingPresenter(_view.Object, accountService.Object);
_presenter.Initialize();
}
示例3: Setup
public void Setup()
{
Testing.Initialize();
Moq.Mock<ICategoryPropertyPresenter> mockCategoryProperty = new Moq.Mock<ICategoryPropertyPresenter>();
mockCategoryProperty.SetupAllProperties();
m_MockCategoryProperty = mockCategoryProperty.Object;
m_MockCategoryProperty.ErrorLabel = new Label();
m_MockCategoryProperty.NameTextBox = new TextBox();
m_MockCategoryProperty.DescriptionTextBox = new TextBox();
m_MockCategoryProperty.NewSerie = new Button();
m_MockCategoryProperty.NewCategory = new Button();
m_MockCategoryProperty.Cancel = new Button();
m_MockCategoryProperty.Delete = new Button();
m_MockCategoryProperty.Update = new Button();
}
示例4: Setup
public void Setup()
{
Moq.Mock<ISeriePropertyPresenter> mockSeriePropertyPresenter = new Moq.Mock<ISeriePropertyPresenter>();
mockSeriePropertyPresenter.SetupAllProperties();
m_MockSeriePropertyPresenter = mockSeriePropertyPresenter.Object;
m_MockSeriePropertyPresenter.NewSerieButton = new Button();
m_MockSeriePropertyPresenter.NewFigurButton = new Button();
m_MockSeriePropertyPresenter.SaveButton = new Button();
m_MockSeriePropertyPresenter.DeleteButton = new Button();
m_MockSeriePropertyPresenter.CancelButton = new Button();
m_MockSeriePropertyPresenter.ErrorMessage = new Label();
m_MockSeriePropertyPresenter.Name = new TextBox();
m_MockSeriePropertyPresenter.Description = new TextBox();
m_MockSeriePropertyPresenter.PublicationYear = new TextBox();
m_MockSeriePropertyPresenter.ChooseCategory = new DropDownList();
}
示例5: Setup
public void Setup()
{
Moq.Mock<IFigurPropertyPresenter> mockFigurPropertyPresenter = new Moq.Mock<IFigurPropertyPresenter>();
mockFigurPropertyPresenter.SetupAllProperties();
m_MockFigurProperty = mockFigurPropertyPresenter.Object;
m_MockFigurProperty.NewFigurButton = new Button();
m_MockFigurProperty.SaveButton = new Button();
m_MockFigurProperty.DeleteButton = new Button();
m_MockFigurProperty.CancelButton = new Button();
m_MockFigurProperty.ErrorMessage = new Label();
m_MockFigurProperty.Name = new TextBox();
m_MockFigurProperty.Description = new TextBox();
m_MockFigurProperty.Price = new TextBox();
m_MockFigurProperty.ChooseSerie = new DropDownList();
m_MockFigurProperty.Figur = null;
}
示例6: SetMocks
private void SetMocks()
{
Moq.Mock<ICategoryPropertyPresenter> mockCategoryProperty = new Moq.Mock<ICategoryPropertyPresenter>();
Moq.Mock<IMultiView> mockMultiView = new Moq.Mock<IMultiView>();
Moq.Mock<ITreeView> mockTreeView = new Moq.Mock<ITreeView>();
mockCategoryProperty.SetupAllProperties();
mockMultiView.SetupAllProperties();
mockTreeView.SetupAllProperties();
MockCategoryProperty = mockCategoryProperty.Object;
MockMultiView = mockMultiView.Object;
MockTreeView = mockTreeView.Object;
MockCategoryProperty.ErrorLabel = new Label();
MockCategoryProperty.NameTextBox = new TextBox();
MockCategoryProperty.DescriptionTextBox = new TextBox();
MockCategoryProperty.NewSerie = new Button();
MockCategoryProperty.NewCategory = new Button();
MockCategoryProperty.Cancel = new Button();
MockCategoryProperty.Delete = new Button();
MockCategoryProperty.Update = new Button();
MockMultiView.MultiViewCategory = new MultiView();
MockMultiView.MultiViewFigur = new MultiView();
MockMultiView.MultiViewSerie = new MultiView();
MockMultiView.ViewCategoryProperty = new View();
MockMultiView.ViewFigurProperty = new View();
MockMultiView.ViewFigurStore = new View();
MockMultiView.ViewSerieProperty = new View();
MockMultiView.ViewSerieStore = new View();
MockMultiView.MultiViewCategory.Views.Add(MockMultiView.ViewCategoryProperty);
MockMultiView.MultiViewSerie.Views.Add(MockMultiView.ViewSerieProperty);
MockMultiView.MultiViewSerie.Views.Add(MockMultiView.ViewSerieStore);
MockMultiView.MultiViewFigur.Views.Add(MockMultiView.ViewFigurProperty);
MockMultiView.MultiViewFigur.Views.Add(MockMultiView.ViewFigurStore);
MockTreeView.Menu = new Menu();
MockTreeView.OverviewTreeView = new TreeView();
MockTreeView.Menu.Items.Add(new MenuItem("Eigenschaft", "1"));
MockTreeView.Menu.Items.Add(new MenuItem("Lager", "2"));
}