Is there a way to make conditional TearDown in NUnit?
I have a TestFixture in which I need to run the cleanup code in just a few tests, and I really don't want to:
Unfortunately no.
Can you do the cleanup in [TestFixtureTearDown] so that after all tests are completed? I think it depends on whether to clean before the next test.
, , /TextFixture , . TearDown, .
Edit: , , , , , , , NUnit - , , . . , , , -
TearDown :
[TearDown] public virtual void TearDown() { // Tear down things here }
, , :
[TearDown] public override void TearDown() { // By not calling base.TearDown() here you avoid tearing down }
Source: https://habr.com/ru/post/1713847/More articles:How to use shared hosting Python servers? - pythonGetting additional rows - After connecting 3 tables using Left Join - sqlRefresh the table using the fields of two other tables, please help me with this - sqlОбновить таблицу с подзапросом, который возвращает более одной строки - sqlDoes anyone know a DIY kit with built-in linux that supports C # Mono? - c #Website development, accessed through applications for mobile phones - mobileCall the Google Maps API V3 API API from a Windows Forms app? - javascriptUpdating a row with a subquery returning multiple rows - sqlОбработка ошибок в Classic Asp без ошибки таймаута - sql-server-2005https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1713852/jaas-tomcat-login-module-possible-method-to-pass-ip-address&usg=ALkJrhjCN_cLfg4v491XwWccL9mHJXPXoQAll Articles