From 4612446fb7aa84701bfc91cc2fd535b624482a05 Mon Sep 17 00:00:00 2001 From: Nick Chursin Date: Wed, 21 Nov 2018 13:26:00 +0200 Subject: [PATCH] #17 fix --- appveyor.yml | 8 ++++---- src/Core/AllureNUnitHelper.cs | 7 ++++--- src/TestSamples/TestClass7.cs | 11 +++++++++++ 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index bad12df..dcd3dfa 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,7 @@ -version: 1.0.4 +version: 1.0.5 environment: - nugetVersion: 1.0.4 + nugetVersion: 1.0.5 init: - ps: Update-AppveyorBuild -Version $env:nugetVersion @@ -35,6 +35,6 @@ for: branches: only: - develop - version: 1.0.4-beta{build} + version: 1.0.6-beta{build} environment: - nugetVersion: 1.0.4-beta$(APPVEYOR_BUILD_NUMBER) \ No newline at end of file + nugetVersion: 1.0.6-beta$(APPVEYOR_BUILD_NUMBER) \ No newline at end of file diff --git a/src/Core/AllureNUnitHelper.cs b/src/Core/AllureNUnitHelper.cs index 626c027..9e4f15c 100644 --- a/src/Core/AllureNUnitHelper.cs +++ b/src/Core/AllureNUnitHelper.cs @@ -231,14 +231,15 @@ private void StopTestCase() { UpdateTestDataFromAttributes(); for (var i = 0; i < _test.Arguments.Length; i++) + { AllureLifecycle.UpdateTestCase(x => x.parameters.Add(new Parameter { // ReSharper disable once AccessToModifiedClosure name = $"Param #{i}", - // ReSharper disable once AccessToModifiedClosure - value = _test.Arguments[i].ToString() + // ReSharper disable once AccessToModifiedClosure + value = _test.Arguments[i] == null ? "NULL" : _test.Arguments[i].ToString() })); - + } AllureLifecycle.UpdateTestCase(x => x.statusDetails = new StatusDetails { diff --git a/src/TestSamples/TestClass7.cs b/src/TestSamples/TestClass7.cs index 02b9936..35c36c7 100644 --- a/src/TestSamples/TestClass7.cs +++ b/src/TestSamples/TestClass7.cs @@ -1,5 +1,6 @@ using System; using System.Threading; +using NUnit.Allure.Attributes; using NUnit.Allure.Core; using NUnit.Framework; @@ -50,5 +51,15 @@ public void Test2() { Console.WriteLine("Test2"); } + + [Test, Combinatorial] + [AllureLink("https://github.com/unickq/allure-nunit/issues/17")] + public void TestExample( + [Range(1, 3)] int valA, + [Values(null, 2)] int? valB + ) + { + Assert.AreEqual(valA, valB); + } } } \ No newline at end of file