11 Commits

Author SHA1 Message Date
Matteo Cominetti 087788f7a1 feat: update deps
Publish nugets / build (push) Has been cancelled
2023-06-07 16:06:08 +01:00
connorivy 201469e9b1 Merge pull request #31 from specklesystems/connorivy-fix-readme
Update README.md
2023-03-27 09:06:11 -05:00
connorivy 3986a7c1f2 Update README.md 2023-03-27 09:01:20 -05:00
Matteo Cominetti fba1d1ce32 chore: make submodule path relative 2023-03-15 11:01:01 +01:00
Matteo Cominetti 69c09c181e Merge pull request #27 from specklesystems/connor/edit-gitignore
edit location of config.json in gitignore
2023-03-10 08:33:30 +00:00
Matteo Cominetti 8665a6c593 Merge pull request #28 from specklesystems/connor/fix-revit-tests
Fix: don't dispose revit app and event handler or tests won't run
2023-03-10 08:32:41 +00:00
Connor Ivy 167a67abb5 We don't want to dispose the app and event handler 2023-03-09 16:36:35 -06:00
Connor Ivy 1cd15df583 add config.json 2023-03-09 14:50:41 -06:00
Matteo Cominetti 301db983b8 Update README.md 2023-03-09 20:26:17 +00:00
Matteo Cominetti 1fd60ebe55 ci 2023-03-09 21:22:32 +01:00
Matteo Cominetti 2ac5268287 Merge pull request #26 from specklesystems/sdk-style-proj
Build / build (push) Has been cancelled
feat: move Runner to sdk style proj
2023-03-09 20:19:58 +00:00
14 changed files with 100 additions and 28 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
name: Build
name: Publish nugets
on:
push:
+1 -1
View File
@@ -348,5 +348,5 @@ MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
xUnitRevit/config.json
xUnitRevitRunner/xUnitRevitRunnerShared/config.json
.idea/
+1 -1
View File
@@ -1,3 +1,3 @@
[submodule "speckle.xunit.runner.wpf"]
path = speckle.xunit.runner.wpf
url = git@github.com:specklesystems/speckle.xunit.runner.wpf.git
url = ../speckle.xunit.runner.wpf.git
+7 -9
View File
@@ -1,6 +1,6 @@
# xUnitRevit
[![Build Status](https://teocomi.visualstudio.com/Speckle/_apis/build/status/Speckle-Next.xunit-Revit?branchName=master)](https://teocomi.visualstudio.com/Speckle/_build/latest?definitionId=2&branchName=master)
[![Build](https://github.com/specklesystems/xUnitRevit/actions/workflows/dotnet-desktop.yml/badge.svg?branch=master)](https://github.com/specklesystems/xUnitRevit/actions/workflows/dotnet-desktop.yml)
![xunit2](https://user-images.githubusercontent.com/2679513/88958499-77809980-d298-11ea-84b6-e0749790ffc5.gif)
@@ -20,7 +20,7 @@ Many thanks to all the developers of xunit and xunit.runner.wpf!
This repo is composed of 2 projects:
- **xUnitRevit**: the actual Revit addin
- **xUnitRevitRunner**: the actual Revit addin
- **xUnitRevitUtils**: a utility library to help pass Revit data to the test libraries when running the tests
@@ -29,18 +29,16 @@ This repo is composed of 2 projects:
There are very few steps required to create and run your fist unit tests with xUnitRevit:
1. create a copy of the [config sample file](xUnitRevit/config_sample.json) and re-name the copy to `config.json`
1. create a copy of the [config sample file](xUnitRevitRunner/xUnitRevitRunnerShared/config_sample.json) and re-name the copy to `config.json`
2. follow the instructions [here](#configuration) to set up the config file
2. build/install xUnitRevit
2. build/install xUnitRevitRunner
3. create a test library
4. start Revit, launch the xUnitRevit addin and select the test library
4. start Revit, launch the xUnitRevitRunner addin and select the test library
5. done! Add a star ⭐ to our repo if it was useful 😉
### Building/installing xUnitRevit
After cloning this repo, all you need to do to run xUnitRevit is to build the project in **Debug mode**, by selecting the build configuration that matches your Revit version.
![image](https://user-images.githubusercontent.com/2679513/88941424-e5b96200-d280-11ea-8ef4-12fbb0ed13d2.png)
After cloning this repo, all you need to do to run xUnitRevitRunner is to build the project corresponding to your revit version in **Debug mode**
**This will build the project and copy its dlls to the Revit addin folder** `%appdata%\Autodesk\Revit\Addins`.
@@ -206,4 +204,4 @@ For any security vulnerabilities or concerns, please contact us directly at secu
## License
Unless otherwise described, the code in this repository is licensed under the MIT License. Please note that some modules, extensions or code herein might be otherwise licensed. This is indicated either in the root of the containing folder under a different license file, or in the respective file's header. If you have any questions, don't hesitate to get in touch with us via [email](mailto:hello@speckle.systems).
Unless otherwise described, the code in this repository is licensed under the MIT License. Please note that some modules, extensions or code herein might be otherwise licensed. This is indicated either in the root of the containing folder under a different license file, or in the respective file's header. If you have any questions, don't hesitate to get in touch with us via [email](mailto:hello@speckle.systems).
+7 -9
View File
@@ -25,8 +25,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "xUnitRevitUtils2020", "xUni
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "xUnitRevitUtils2019", "xUnitRevitUtils\xUnitRevitUtils2019\xUnitRevitUtils2019.csproj", "{469F8B29-F14E-49E8-B145-8C4FEF9D68CA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "speckle.xunit.runner.wpf", "speckle.xunit.runner.wpf\speckle.xunit.runner.wpf\speckle.xunit.runner.wpf.csproj", "{B6404BAD-9314-45F9-9F4D-A644D986FC37}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Extra", "Extra", "{B01105F5-963D-42C3-BFA7-2D26AC375D07}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "xUnitRevitRunner", "xUnitRevitRunner", "{CF685C5E-70E1-40C5-BCFD-1E27695F0364}"
@@ -46,6 +44,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "xUnitRevitRunner2022", "xUn
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "xUnitRevitRunner2023", "xUnitRevitRunner\xUnitRevitRunner2023\xUnitRevitRunner2023.csproj", "{97D93392-9484-484F-9F5F-60C5F3D67045}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "speckle.xunit.runner.wpf", "speckle.xunit.runner.wpf\speckle.xunit.runner.wpf\speckle.xunit.runner.wpf.csproj", "{54B0C195-2AF8-47EE-805A-07F8FD1E7CAA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -76,12 +76,6 @@ Global
{469F8B29-F14E-49E8-B145-8C4FEF9D68CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{469F8B29-F14E-49E8-B145-8C4FEF9D68CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{469F8B29-F14E-49E8-B145-8C4FEF9D68CA}.Release|Any CPU.Build.0 = Release|Any CPU
{B6404BAD-9314-45F9-9F4D-A644D986FC37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6404BAD-9314-45F9-9F4D-A644D986FC37}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6404BAD-9314-45F9-9F4D-A644D986FC37}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B6404BAD-9314-45F9-9F4D-A644D986FC37}.Release|Any CPU.Build.0 = Release|Any CPU
{2B4F4767-CF26-485B-ADB3-751250EB1CDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B4F4767-CF26-485B-ADB3-751250EB1CDB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E3A15534-FB02-4CE2-8126-22E60EB1922E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E3A15534-FB02-4CE2-8126-22E60EB1922E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E3A15534-FB02-4CE2-8126-22E60EB1922E}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -102,6 +96,10 @@ Global
{97D93392-9484-484F-9F5F-60C5F3D67045}.Debug|Any CPU.Build.0 = Debug|Any CPU
{97D93392-9484-484F-9F5F-60C5F3D67045}.Release|Any CPU.ActiveCfg = Release|Any CPU
{97D93392-9484-484F-9F5F-60C5F3D67045}.Release|Any CPU.Build.0 = Release|Any CPU
{54B0C195-2AF8-47EE-805A-07F8FD1E7CAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{54B0C195-2AF8-47EE-805A-07F8FD1E7CAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{54B0C195-2AF8-47EE-805A-07F8FD1E7CAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{54B0C195-2AF8-47EE-805A-07F8FD1E7CAA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -113,13 +111,13 @@ Global
{441C42B5-400D-4EA3-9F2A-26B80CF37E8E} = {EDC05463-E574-4FF0-8518-D93D70EC138C}
{6118A3C3-479F-4CA9-BB00-9FCBF55BF8B8} = {EDC05463-E574-4FF0-8518-D93D70EC138C}
{469F8B29-F14E-49E8-B145-8C4FEF9D68CA} = {EDC05463-E574-4FF0-8518-D93D70EC138C}
{B6404BAD-9314-45F9-9F4D-A644D986FC37} = {B01105F5-963D-42C3-BFA7-2D26AC375D07}
{2B4F4767-CF26-485B-ADB3-751250EB1CDB} = {CF685C5E-70E1-40C5-BCFD-1E27695F0364}
{E3A15534-FB02-4CE2-8126-22E60EB1922E} = {CF685C5E-70E1-40C5-BCFD-1E27695F0364}
{3782DB94-2F99-4449-B727-D5E4172964AD} = {CF685C5E-70E1-40C5-BCFD-1E27695F0364}
{66615756-3C3F-4A46-9C00-D6BA2493B6FA} = {CF685C5E-70E1-40C5-BCFD-1E27695F0364}
{72816F5F-F86C-4A84-A4BB-9C05F2CD5320} = {CF685C5E-70E1-40C5-BCFD-1E27695F0364}
{97D93392-9484-484F-9F5F-60C5F3D67045} = {CF685C5E-70E1-40C5-BCFD-1E27695F0364}
{54B0C195-2AF8-47EE-805A-07F8FD1E7CAA} = {B01105F5-963D-42C3-BFA7-2D26AC375D07}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1CD726E4-6BBA-4FC3-9C57-0981EF1A9475}
@@ -37,7 +37,7 @@ namespace xUnitRevit
private void ControlledApplication_ApplicationInitialized(object sender, Autodesk.Revit.DB.Events.ApplicationInitializedEventArgs e)
{
var app = sender as Application;
using var uiapp = new UIApplication(app);
var uiapp = new UIApplication(app);
Runner.ReadConfig();
@@ -23,7 +23,7 @@ namespace xUnitRevit
try
{
var queue = new List<Action>();
using var eventHandler = ExternalEvent.Create(new ExternalEventHandler(queue));
var eventHandler = ExternalEvent.Create(new ExternalEventHandler(queue));
xru.Initialize(uiapp, SynchronizationContext.Current, eventHandler, queue);
@@ -2,5 +2,5 @@
"startupAssemblies": [
"C:\\Code\\Speckle-Next\\ConverterRevit\\ConverterRevitTests\\bin\\Debug\\ConverterRevitTests.dll"
],
"autoStart": true
"autoStart": false
}
@@ -24,9 +24,6 @@
<Compile Include="$(MSBuildThisFileDirectory)Runner.cs" />
</ItemGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)config_sample.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="$(MSBuildThisFileDirectory)xUnitRevitRunner.addin">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
@@ -11,4 +11,19 @@
<PackageReference Include="xunit" Version="2.4.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="IDisposableAnalyzers" Version="4.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="Meziantou.Analyzer" Version="2.0.60">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Update="Roslynator.Analyzers" Version="4.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
@@ -12,4 +12,20 @@
<PackageReference Include="xunit" Version="2.4.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="IDisposableAnalyzers" Version="4.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="Meziantou.Analyzer" Version="2.0.60">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Update="Roslynator.Analyzers" Version="4.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
@@ -12,4 +12,20 @@
<PackageReference Include="xunit" Version="2.4.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="IDisposableAnalyzers" Version="4.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="Meziantou.Analyzer" Version="2.0.60">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Update="Roslynator.Analyzers" Version="4.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
@@ -8,10 +8,26 @@
<ItemGroup>
<PackageReference Include="Speckle.Revit.API" Version="2022.0.2.1" >
<PackageReference Include="Speckle.Revit.API" Version="2022.0.2.1">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.4.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="IDisposableAnalyzers" Version="4.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="Meziantou.Analyzer" Version="2.0.60">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Update="Roslynator.Analyzers" Version="4.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
@@ -14,4 +14,20 @@
<PackageReference Include="xunit" Version="2.4.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="IDisposableAnalyzers" Version="4.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="Meziantou.Analyzer" Version="2.0.60">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Update="Roslynator.Analyzers" Version="4.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>