https://github.com/stofte/t4-template-tests
Example T4 Text Templates and testing
https://github.com/stofte/t4-template-tests
Last synced: about 1 year ago
JSON representation
Example T4 Text Templates and testing
- Host: GitHub
- URL: https://github.com/stofte/t4-template-tests
- Owner: stofte
- Created: 2015-01-30T19:42:32.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-01-30T19:49:36.000Z (over 11 years ago)
- Last Synced: 2025-02-01T02:18:47.667Z (over 1 year ago)
- Language: C#
- Size: 129 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
T4 Text Template Example with Unit Tests [](https://travis-ci.org/stofte/t4-template-tests)
----------------------------------------------------------------------------------------------------------------------------------------------------------------
The T4.Generator project contains, along with the code generator itself,
a console program that reads XML files to write C# code to the
console. T4.Test contains an example of how the generated code can
be unit tested.
The unit tests are generated by a design time T4 text template that
references the output folder of the T4.Generator project. Since VS
cannot detect this dependency, the dependency graph must be specified
otherwise. First start by building the T4.Generator project, then
manually transform the design time unit test template (right click
and select run custom tool), after which the VS test runner can be
used normally.