Skip to content

Commit

Permalink
Add TestsRevitUI to validate fake RevitAPIUI reference
Browse files Browse the repository at this point in the history
  • Loading branch information
ricaun committed Oct 1, 2024
1 parent c05be68 commit 68eb355
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Use `LocalExtensionData` to store `TestModel` result.
- Add `EnvironmentSettings` to overwrite settings in the `TestAdapter`.
- Update `JsonService` implementation to use `Newtonsoft.Json` in the domain.
### Tests
- Add `TestsRevitUI` to validate fake `RevitAPIUI` reference.

## [1.5.0] / 2024-09-11 - 2024-09-19
### Features
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
39 changes: 39 additions & 0 deletions ricaun.RevitTest.Tests/TestsRevitUI.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using Autodesk.Revit.ApplicationServices;
using Autodesk.Revit.UI;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace ricaun.RevitTest.Tests
{
public class TestsRevitUI
{
static IEnumerable<Type> GetTypes()
{
yield return typeof(UIApplication);
yield return typeof(Application);
yield return typeof(UIFramework.RevitRibbonControl);
yield return typeof(Autodesk.Windows.RibbonControl);
}
[TestCaseSource(nameof(GetTypes))]
public void TestTypes(Type type)
{
Console.WriteLine(type);
}

#if DEBUG
static IEnumerable<Assembly> GetAssemblyTypes()
{
return GetTypes().Select(t => t.Assembly);
}

[TestCaseSource(nameof(GetAssemblyTypes))]
public void TestAssemblyTypes(Assembly assembly)
{
Console.WriteLine(assembly);
}
#endif
}
}

0 comments on commit 68eb355

Please sign in to comment.