Beispiel #1
0
        public void InitializeTest()
        {
            this.wizard   = new ItemWizardImplementation(new FormFactory(this.MockFactory), new ErrorDisplay(this.DisplayError));
            this.mockForm = null;

            this.wizardData                 = new WizardData();
            this.wizardData.TraceFile       = Path.GetTempFileName();
            this.wizardData.TraceFileSource = TraceFileSource.Dynamic;
            this.wizardData.Configuration   = new WcfUnitConfiguration();
            this.wizardData.Configuration.testMethodMode     = TestMethodMode.ScenarioMethodOnly;
            this.wizardData.Configuration.operationTimerMode = OperationTimerMode.IncludeOperationTimers;
            AssemblyType a = new AssemblyType();

            a.fileName = "ClientProxies.dll";
            this.wizardData.Configuration.assembly    = new AssemblyType[] { a };
            this.wizardData.Configuration.soapActions = new WcfUnitConfigurationSoapActions();
            this.wizardData.Configuration.soapActions.soapActionMode = SoapActionMode.Include;

            this.errorDisplayCalled = false;

            File.Copy(@"..\..\..\Library.Test\TestData\SampleWithNamespaces.svclog", this.wizardData.TraceFile, true);
            File.SetAttributes(this.wizardData.TraceFile, FileAttributes.Normal); // make sure not read only
            File.Delete("ignore.cs");
            File.Delete("test.cs");
            File.Delete("ignorestub.cs");
            File.Delete("teststub.cs");
        }
Beispiel #2
0
 /// <summary>
 /// Creates a wizard form.
 /// </summary>
 /// <returns>A wizard form</returns>
 private IWizardForm MockFactory()
 {
     Assert.IsNull(this.mockForm, "The wizard should never request a form more than once");
     this.mockForm = new MockWizardForm();
     this.mockForm.RunWizardThrowsException = this.runWizardThrowsException;
     return(this.mockForm);
 }