Skip to content

Commit

Permalink
Merge pull request allure-framework#21 from gamerka/master
Browse files Browse the repository at this point in the history
Must fix bugs about TestCase reporting
  • Loading branch information
ilya-murzinov authored Sep 3, 2016
2 parents ab75b4b + 2107121 commit d2bd6ec
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions NUnitAllureAdapter/AllureEventListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public override void TestStarted(TestName testName)
try
{
string assembly = testName.FullName.Split('.')[0];
string clazz = testName.FullName.Split('.')[testName.FullName.Split('.').Count() - 2];
string clazz = testName.FullName.Split('(')[0].Split('.')[testName.FullName.Split('(')[0].Split('.').Count() - 2];

var evt = new TestCaseStartedEvent((string) SuiteStorage[SuiteStorage.Count - 1], testName.FullName);

Expand Down Expand Up @@ -182,12 +182,15 @@ Assembly asm in AppDomain.CurrentDomain.GetAssemblies().Where(x => x.FullName.Co
{
var manager = new AttributeManager(type.GetCustomAttributes(false).OfType<Attribute>().ToList());
manager.Update(evt);

SuiteStorage.Add(testName.FullName, suiteUid);

_lifecycle.Fire(evt);

return;
}
}

SuiteStorage.Add(testName.FullName, suiteUid);

_lifecycle.Fire(evt);
}
catch (Exception e)
{
Expand Down

0 comments on commit d2bd6ec

Please sign in to comment.