-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Tests_AllSetUp.cs
56 lines (50 loc) · 1.64 KB
/
Tests_AllSetUp.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using Autodesk.Revit.ApplicationServices;
using Autodesk.Revit.UI;
using NUnit.Framework;
using System;
namespace RevitTest.Sample
{
public class Tests_AllSetUp
{
UIApplication uiapp;
Application application;
UIControlledApplication uiControlledApplication;
ControlledApplication controlledApplication;
[OneTimeSetUp]
public void Setup(
UIApplication uiapp,
Application application,
UIControlledApplication uiControlledApplication,
ControlledApplication controlledApplication)
{
this.uiapp = uiapp;
this.application = application;
this.uiControlledApplication = uiControlledApplication;
this.controlledApplication = controlledApplication;
}
[Test]
public void RevitTests_UIApplication_VersionName()
{
Assert.IsNotNull(uiapp);
Console.WriteLine(uiapp.Application.VersionName);
}
[Test]
public void RevitTests_Application_VersionName()
{
Assert.IsNotNull(application);
Console.WriteLine(application.VersionName);
}
[Test]
public void RevitTests_UIControlledApplication_VersionName()
{
Assert.IsNotNull(uiControlledApplication);
Console.WriteLine(uiControlledApplication.ControlledApplication.VersionName);
}
[Test]
public void RevitTests_ControlledApplication_VersionName()
{
Assert.IsNotNull(controlledApplication);
Console.WriteLine(controlledApplication.VersionName);
}
}
}