public MockUserFormBuilder(Mock <VBComponent> component, MockProjectBuilder mockProjectBuilder)
        {
            if (component.Object.Type != vbext_ComponentType.vbext_ct_MSForm)
            {
                throw new InvalidOperationException("Component type must be 'vbext_ComponentType.vbext_ct_MSForm'.");
            }

            _component          = component;
            _mockProjectBuilder = mockProjectBuilder;
            _vbControls         = CreateControlsMock();
        }
        public MockUserFormBuilder(Mock<VBComponent> component, MockProjectBuilder mockProjectBuilder)
        {
            if (component.Object.Type != vbext_ComponentType.vbext_ct_MSForm)
            {
                throw new InvalidOperationException("Component type must be 'vbext_ComponentType.vbext_ct_MSForm'.");
            }

            _component = component;
            _mockProjectBuilder = mockProjectBuilder;
            _vbControls = CreateControlsMock();
        }
Beispiel #3
0
        public MockProjectBuilder ProjectBuilder(string name, string filename, vbext_ProjectProtection protection)
        {
            var result = new MockProjectBuilder(name, filename, protection, () => _vbe.Object, this);

            return(result);
        }
 public MockProjectBuilder ProjectBuilder(string name, string filename, vbext_ProjectProtection protection)
 {
     var result = new MockProjectBuilder(name, filename, protection, () => _vbe.Object, this);
     return result;
 }