コード例 #1
0
            public virtual void Initialize()
            {
                this.Settings = new Mock <IMenuSettings>();
                this.Settings.SetupAllProperties();
                this.Settings.Setup(x => x.CommandId).Returns(Guid.Empty);
                this.Settings.Setup(x => x.Text).Returns("MenuText");
                this.Settings.Setup(x => x.Owner.Name).Returns("MenuAutomation");

                this.Owner = new Mock <IProductElement>();

                this.Automation = new MenuAutomation(this.Owner.Object, this.Settings.Object);
            }
コード例 #2
0
            public virtual void Initialize()
            {
                this.Settings = new Mock<IMenuSettings>();
                this.Settings.SetupAllProperties();
                this.Settings.Setup(x => x.CommandId).Returns(Guid.Empty);
                this.Settings.Setup(x => x.Text).Returns("MenuText");
                this.Settings.Setup(x => x.Owner.Name).Returns("MenuAutomation");

                this.Owner = new Mock<IProductElement>();

                this.Automation = new MenuAutomation(this.Owner.Object, this.Settings.Object);
            }