Refactor test options attribute

This commit is contained in:
Stephan
2017-09-19 18:47:07 +02:00
parent 1341a37f2b
commit bcf3916e54
4 changed files with 77 additions and 42 deletions

View File

@@ -113,10 +113,7 @@ namespace Umbraco.Tests.Testing
TestObjects = new TestObjects(Container);
// get/merge the attributes marking the method and/or the classes
var testName = TestContext.CurrentContext.Test.Name;
var pos = testName.IndexOf('(');
if (pos > 0) testName = testName.Substring(0, pos);
Options = UmbracoTestAttribute.Get(GetType().GetMethod(testName));
Options = TestOptionAttributeBase.GetTestOptions<UmbracoTestAttribute>();
Compose();
Initialize();