Example #1
0
        private static IVBE BuildTestVBE(string class1, string interface1, string module1)
        {
            var projectBuilder = new MockVbeBuilder()
                                 .ProjectBuilder("TestProject", ProjectProtection.Unprotected)
                                 .AddComponent("Class1", ComponentType.ClassModule, class1)
                                 .AddComponent("Interface1", ComponentType.ClassModule, interface1)
                                 .AddComponent("Module1", ComponentType.StandardModule, module1);

            if (module1.Contains("IUnknown"))
            {
                projectBuilder.AddReference(ReferenceLibrary.StdOle);
            }

            return(projectBuilder
                   .AddProjectToVbeBuilder()
                   .Build()
                   .Object);
        }