Skip to content

Commit

Permalink
Merge pull request #963 from nunit/nunitlite
Browse files Browse the repository at this point in the history
Adding a paragraph about the startupobject,
  • Loading branch information
OsirisTerje authored Aug 14, 2024
2 parents 5958c84 + 4b471b3 commit e6cee36
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/articles/nunit/running-tests/NUnitLite-Runner.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,18 @@ installed and referenced for you.
As seen in the following screen shot, the output from an NUnitLite run is quite similar to that from the console runner.

![Screenshot of NUnitLite](~/images/nunitlite-mock.png)

## Tips

### Testing an executable application

When testing an executable application, you can use the NUnitLite runner to execute your tests.
However, this approach will result in having two Main methods in your application. To resolve this,
you need to specify which Main method to use — specifically, the Main method from the test project.
You do this by stating which class contains this method.

You do this by adding a `StartupObject` to your project file:

```xml
<StartupObject>TestProject.Program</StartupObject>
```

0 comments on commit e6cee36

Please sign in to comment.