Skip to content

Commit 0c69735

Browse files
committed
cleanup - per review comments
1 parent 3327bcf commit 0c69735

File tree

4 files changed

+6
-31
lines changed

4 files changed

+6
-31
lines changed

dotnet/Query/Query/Query.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Linq;
66
using Io.Cucumber.Messages.Types;
77
using System.Collections.Concurrent;
8+
using Cucumber.Messages;
89

910
namespace Io.Cucumber.Query;
1011

@@ -192,8 +193,8 @@ public IList<Attachment> FindAttachmentsBy(TestStepFinished testStepFinished) =>
192193
var finished = FindTestCaseFinishedBy(testCaseStarted)?.Timestamp;
193194
if (finished != null)
194195
{
195-
var startTime = started.ToDateTimeOffset();
196-
var finishTime = finished.ToDateTimeOffset();
196+
var startTime = Converters.ToDateTime(started);
197+
var finishTime = Converters.ToDateTime(finished);
197198
return finishTime - startTime;
198199
}
199200
return null;
@@ -210,8 +211,8 @@ public IList<Attachment> FindAttachmentsBy(TestStepFinished testStepFinished) =>
210211
// Java: if (testRunStarted == null || testRunFinished == null) return Optional.empty();
211212
if (_testRunStarted == null || _testRunFinished == null)
212213
return null;
213-
var start = _testRunStarted.Timestamp.ToDateTimeOffset();
214-
var finish = _testRunFinished.Timestamp.ToDateTimeOffset();
214+
var start = Converters.ToDateTime(_testRunStarted.Timestamp);
215+
var finish = Converters.ToDateTime(_testRunFinished.Timestamp);
215216
return finish - start;
216217
}
217218

dotnet/Query/Query/TimestampExtensions.cs

Lines changed: 0 additions & 17 deletions
This file was deleted.

dotnet/Query/QueryTest/QueryAcceptanceTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ private static Stream ReadResourceAsStream(string resourceName)
208208
if (assemblyLocation == null)
209209
throw new InvalidOperationException("Assembly location could not be determined.");
210210

211-
var fullName = Path.Combine(assemblyLocation, "testdata", resourceName);
211+
var fullName = Path.Combine(assemblyLocation, "..\\..\\..\\..\\..\\..\\testdata", resourceName);
212212
if (!File.Exists(fullName))
213213
throw new FileNotFoundException($"Resource {fullName} not found.");
214214
return File.OpenRead(fullName);

dotnet/Query/QueryTest/QueryTest.csproj

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,4 @@
2828
<Using Include="Microsoft.VisualStudio.TestTools.UnitTesting" />
2929
</ItemGroup>
3030

31-
<ItemGroup>
32-
<None Update="testdata\*.ndjson">
33-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
34-
</None>
35-
<None Update="testdata\*.json">
36-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
37-
</None>
38-
</ItemGroup>
39-
4031
</Project>

0 commit comments

Comments
 (0)