Skip to content

Commit

Permalink
Remove Id from TestCaseUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
ricaun committed May 9, 2024
1 parent c50ff55 commit c7871da
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [1.3.2] / 2024-05-09
### Fixed
- Fix `ApplicationUtils` to clear temp folder after some minutes.
- Fix `ApplicationUtils` to clear temp folder after some minutes. (Fix: #41)
- Fix Net Core tests not stay after rebuild. (Fix: #40)

## [1.3.1] / 2024-04-02
### Features
Expand Down
6 changes: 0 additions & 6 deletions ricaun.RevitTest.TestAdapter/TestCaseUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public static TestCase Create(string source, string testName)
var testCase = new TestCase(fullyQualifiedName, TestAdapter.ExecutorUri, source)
{
DisplayName = displayName,
Id = GetGuid(testName),
};

return testCase;
Expand All @@ -53,11 +52,6 @@ private static int LastIndexOfDisplayName(string testName)
return lastIndexOfDot;
}

private static System.Guid GetGuid(string testName)
{
return new System.Guid(testName.GetHashCode(), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}

#endregion
}
}
3 changes: 2 additions & 1 deletion ricaun.RevitTest.TestAdapter/TestDiscoverer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ internal static List<TestCase> GetTests(

foreach (var testName in testNames)
{
AdapterLogger.Logger.Info($"TestCase: {testName}");
var testCase = TestCaseUtils.Create(source, testName);

AdapterLogger.Logger.Info($"TestCase: {testCase} [{testCase.DisplayName}] \t{testCase.Id}");

discoverySink?.SendTestCase(testCase);
tests.Add(testCase);
}
Expand Down
6 changes: 3 additions & 3 deletions ricaun.RevitTest.TestAdapter/TestExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,13 @@ await revit.RunTestAction(source,
private static void RecordResultTestModel(IFrameworkHandle frameworkHandle, string source, List<TestCase> tests, TestModel testModel)
{
TestCase testCase = TryFindSimilarTestCaseUsingTestModel(tests, testModel);

if (testCase is null)
var needToCreateTestCase = testCase is null;
if (needToCreateTestCase)
{
testCase = TestCaseUtils.Create(source, testModel.FullName);
}

AdapterLogger.Logger.Info($"\tTestCase: {testCase} [{testCase.DisplayName}]");
AdapterLogger.Logger.Info($"\tTestCase: {testCase} [{testCase.DisplayName}] \t{testCase.Id}");

var testResult = new TestResult(testCase);

Expand Down

0 comments on commit c7871da

Please sign in to comment.