Exemple #1
0
        public void Setup()
        {
            m_site = new DummyRootSite();

            var rootb = MockRepository.GenerateMock <IVwRootBox>();

            rootb.Expect(rb => rb.Height).Return(10000);
            rootb.Expect(rb => rb.Width).Return(m_site.ClientRectangle.X);
            rootb.Expect(rb => rb.IsPropChangedInProgress).Return(false);

            m_site.RootBox = rootb;

            m_selection = MockRepository.GenerateMock <IVwSelection>();
            m_selection.Expect(s => s.IsValid).Return(true);
            m_site.CreateControl();
            m_site.ScrollMinSize = new Size(m_site.ClientRectangle.Width, 10000);
        }
Exemple #2
0
        public void Setup()
        {
            m_site = new DummyRootSite();

            DynamicMock rootb = new DynamicMock(typeof(IVwRootBox));

            rootb.SetupResult("Height", 10000);
            rootb.SetupResult("Width", m_site.ClientRectangle.X);
            rootb.SetupResult("IsPropChangedInProgress", false);
            m_rootb = (IVwRootBox)rootb.MockInstance;

            m_site.RootBox = m_rootb;

            m_mockSelection = new DynamicMock(typeof(IVwSelection));
            m_mockSelection.SetupResult("IsValid", true);
            m_site.CreateControl();
            m_site.ScrollMinSize = new Size(m_site.ClientRectangle.Width, 10000);
        }
Exemple #3
0
        public void Setup()
        {
            m_site = new DummyRootSite();

            NMock.Dynamic.ClassGenerator.CreateSourceFile = true;
            DynamicMock rootb = new DynamicMock(typeof(IVwRootBox));

            rootb.SetupResult("Height", 10000);
            rootb.SetupResult("Width", m_site.ClientRectangle.X);
            m_rootb = (IVwRootBox)rootb.MockInstance;

            m_site.RootBox = m_rootb;

            m_mockSelection = new DynamicMock(typeof(IVwSelection));
            m_mockSelection.SetupResult("IsValid", true);
            m_site.CreateControl();
            m_site.ScrollMinSize = new Size(m_site.ClientRectangle.Width, 10000);
        }
		public void Setup()
		{
			m_site = new DummyRootSite();

			DynamicMock rootb = new DynamicMock(typeof(IVwRootBox));
			rootb.SetupResult("Height", 10000);
			rootb.SetupResult("Width", m_site.ClientRectangle.X);
			rootb.SetupResult("IsPropChangedInProgress", false);
			m_rootb = (IVwRootBox)rootb.MockInstance;

			m_site.RootBox = m_rootb;

			m_mockSelection = new DynamicMock(typeof(IVwSelection));
			m_mockSelection.SetupResult("IsValid", true);
			m_site.CreateControl();
			m_site.ScrollMinSize = new Size(m_site.ClientRectangle.Width, 10000);
		}
		public void Setup()
		{
			m_site = new DummyRootSite();

			NMock.Dynamic.ClassGenerator.CreateSourceFile = true;
			DynamicMock rootb = new DynamicMock(typeof(IVwRootBox));
			rootb.SetupResult("Height", 10000);
			rootb.SetupResult("Width", m_site.ClientRectangle.X);
			m_rootb = (IVwRootBox)rootb.MockInstance;

			m_site.RootBox = m_rootb;

			m_mockSelection = new DynamicMock(typeof(IVwSelection));
			m_mockSelection.SetupResult("IsValid", true);
			m_site.CreateControl();
			m_site.ScrollMinSize = new Size(m_site.ClientRectangle.Width, 10000);
		}