Using app.config in MBunit test

The installation method of unit test is that the user can run the executable file and select the data set to use. This information is stored in app.config, however, when I try to access app.config when I run unit test with Gallio Icarus, it does not work.

Edit: I got a field to bind to the property of the application, however, when I call Properties.Settings.Default.Save();, it does nothing. The app.exe.config file does not change, and the changes are not saved.

+3
source share
2 answers

app.config - , MyProgramme.exe.config, . Configuration System.Configuration.

Properties.Settings.Default user.config, , Properties.Settings.Default.Save()

app.config Properties.Settings.Default.

.

+2

, .

, app.config. , .

, , ( ctor ), , .

, app.config.

.

+3

Source: https://habr.com/ru/post/1757997/


All Articles