public void Init() { List <TestFrameworkDescriptor> descriptors = new List <TestFrameworkDescriptor>(); MockTestFrameworkFactory factory = new MockTestFrameworkFactory(); Properties mbUnitProperties = new Properties(); mbUnitProperties["id"] = "mbunit"; mbUnitProperties["class"] = "MBUnitTestFramework"; mbUnitProperties["supportedProjects"] = ".vbproj"; mbUnitTestFramework = new MockTestFramework(); factory.Add("MBUnitTestFramework", mbUnitTestFramework); Properties nunitProperties = new Properties(); nunitProperties["id"] = "nunit"; nunitProperties["class"] = "NUnitTestFramework"; nunitProperties["supportedProjects"] = ".csproj"; nunitTestFramework = new MockTestFramework(); factory.Add("NUnitTestFramework", nunitTestFramework); TestFrameworkDescriptor mbUnitDescriptor = new TestFrameworkDescriptor(mbUnitProperties, factory); TestFrameworkDescriptor nunitDescriptor = new TestFrameworkDescriptor(nunitProperties, factory); descriptors.Add(mbUnitDescriptor); descriptors.Add(nunitDescriptor); MockAddInTree addinTree = new MockAddInTree(); addinTree.AddItems("/SharpDevelop/UnitTesting/TestFrameworks", descriptors); testFrameworks = new RegisteredTestFrameworks(addinTree); }
public void Init() { List <TestFrameworkDescriptor> descriptors = new List <TestFrameworkDescriptor>(); MockTestFrameworkFactory factory = new MockTestFrameworkFactory(); Properties mbUnitProperties = new Properties(); mbUnitProperties["id"] = "mbunit"; mbUnitProperties["class"] = "MBUnitTestFramework"; mbUnitProperties["supportedProjects"] = ".vbproj"; mbUnitTestFramework = new MockTestFramework(); factory.Add("MBUnitTestFramework", mbUnitTestFramework); Properties nunitProperties = new Properties(); nunitProperties["id"] = "nunit"; nunitProperties["class"] = "NUnitTestFramework"; nunitProperties["supportedProjects"] = ".csproj"; nunitTestFramework = new MockTestFramework(); factory.Add("NUnitTestFramework", nunitTestFramework); TestFrameworkDescriptor mbUnitDescriptor = new TestFrameworkDescriptor(mbUnitProperties, factory); TestFrameworkDescriptor nunitDescriptor = new TestFrameworkDescriptor(nunitProperties, factory); descriptors.Add(mbUnitDescriptor); descriptors.Add(nunitDescriptor); MockAddInTree addinTree = new MockAddInTree(); addinTree.AddItems("/SharpDevelop/UnitTesting/TestFrameworks", descriptors); testFrameworks = new RegisteredTestFrameworks(addinTree); project = new MockCSharpProject(); nunitTestFramework.AddTestProject(project); mbUnitTestFramework.AddTestProject(project); method = MockMethod.CreateMockMethodWithoutAnyAttributes(); method.MockDeclaringType.MockProjectContent.Project = project; clazz = MockClass.CreateMockClassWithoutAnyAttributes(); clazz.MockProjectContent.Project = project; }
public void Setup() { var factory = new MockTestFrameworkFactory(); Properties nunitProperties = new Properties(); nunitProperties["id"] = "nunit"; nunitProperties["class"] = "NUnitTestFramework"; nunitProperties["supportedProjects"] = ".csproj"; nunitTestFramework = new MockTestFramework(); factory.Add("NUnitTestFramework", nunitTestFramework); var mspecProperties = new Properties(); mspecProperties["id"] = "mspec"; mspecProperties["class"] = "MSpecTestFramework"; mspecProperties["supportedProjects"] = ".csproj"; mspecTestFramework = new MockTestFramework(); factory.Add("MSpecTestFramework", mspecTestFramework); TestFrameworkDescriptor mspecDescriptor = new TestFrameworkDescriptor(mspecProperties, factory); TestFrameworkDescriptor nunitDescriptor = new TestFrameworkDescriptor(nunitProperties, factory); var descriptors = new List <TestFrameworkDescriptor> { mspecDescriptor, nunitDescriptor }; MockAddInTree addinTree = new MockAddInTree(); addinTree.AddItems("/SharpDevelop/UnitTesting/TestFrameworks", descriptors); testFrameworks = new RegisteredTestFrameworks(addinTree); nunitTestProject = new MockCSharpProject(); nunitTestProject.FileName = @"d:\projects\nunitTestProject.csproj"; nunitTestFramework.AddTestProject(nunitTestProject); mspecTestProject = new MockCSharpProject(); mspecTestProject.FileName = @"d:\projects\mspecTestProject.csproj"; mspecTestFramework.AddTestProject(mspecTestProject); }
void CreateTestFrameworkDescriptorToSupportProjectFileExtensions(string fileExtensions) { Properties properties = new Properties(); properties["id"] = "nunit"; properties["class"] = "NUnitTestFramework"; properties["supportedProjects"] = fileExtensions; fakeTestFrameworkFactory = new MockTestFrameworkFactory(); fakeTestFramework = new MockTestFramework(); fakeTestFrameworkFactory.Add("NUnitTestFramework", fakeTestFramework); descriptor = new TestFrameworkDescriptor(properties, fakeTestFrameworkFactory); }
public void Init() { Properties properties = new Properties(); properties["id"] = "Default"; properties["class"] = "UnitTesting.Tests.Utils.MockTestFramework"; Codon codon = new Codon(null, "TestFramework", properties, null); mockTestFrameworkFactory = new MockTestFrameworkFactory(); mockTestFramework = new MockTestFramework(); mockTestFrameworkFactory.Add("UnitTesting.Tests.Utils.MockTestFramework", mockTestFramework); doozer = new TestFrameworkDoozer(); descriptor = doozer.BuildItem(codon, mockTestFrameworkFactory); }
public void Init() { factory = new MockTestFrameworkFactory(); myTestFramework = new MockTestFramework(); factory.Add("MyClass", myTestFramework); }