Skip to content

Commit

Permalink
bump RevitTestLibrary.MSTest to 0.1.2.2025
Browse files Browse the repository at this point in the history
  • Loading branch information
NeVeSpl committed Mar 24, 2024
1 parent 7d8e756 commit 4382979
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
19 changes: 2 additions & 17 deletions tests/RDQ/CommandParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public void CanParseParameterCommand(RevitContext revitContext, string cmd)
[DataRow("r:myRoom")]
public void CanParseRoomCommand(RevitContext revitContext, string cmd)
{
var path = Path.Combine(GetDir(), @"..\..\assets\testmodel_rdq.rvt");
var path = Path.Combine(revitContext.TestAssemblyLocation, @"..\..\..\assets\testmodel_rdq.rvt");
var document = revitContext.UIApplication.Application.OpenDocumentFile(path);

CommandParser.LoadDocumentSpecificData(document);
Expand All @@ -166,7 +166,7 @@ public void CanParseRoomCommand(RevitContext revitContext, string cmd)
[DataRow("f:mySelectionFilter")]
public void CanParseRuleBasedFilterCommand(RevitContext revitContext, string cmd)
{
var path = Path.Combine(GetDir(), @"..\..\assets\testmodel_rdq.rvt");
var path = Path.Combine(revitContext.TestAssemblyLocation, @"..\..\..\assets\testmodel_rdq.rvt");
var document = revitContext.UIApplication.Application.OpenDocumentFile(path);

CommandParser.LoadDocumentSpecificData(document);
Expand Down Expand Up @@ -207,20 +207,5 @@ public void CanParseVisibleInViewCommand(RevitContext revitContext, string cmd)
//Assert.IsNotNull(match);
//Assert.AreEqual(StructuralType.Brace, match.Value);
}





public static string GetDir()
{
return "G:\\RevitDBExplorer\\tests\\bin\\Debug";

var asm = Assembly.GetExecutingAssembly();
string codeBase = asm.CodeBase;
UriBuilder uri = new UriBuilder(codeBase);
string path = Uri.UnescapeDataString(uri.Path);
return Path.GetDirectoryName(path);
}
}
}
2 changes: 1 addition & 1 deletion tests/RevitDBExplorer.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.2.2" />
<PackageReference Include="RevitTestLibrary.MSTest" Version="0.1.1.2025" />
<PackageReference Include="RevitTestLibrary.MSTest" Version="0.1.2.2025" />
</ItemGroup>
</Project>

0 comments on commit 4382979

Please sign in to comment.