{"id":22,"date":"2006-05-05T14:58:56","date_gmt":"2006-05-05T12:58:56","guid":{"rendered":"http:\/\/soci.hu\/blog\/index.php\/2006\/05\/05\/nunit-teszteles-sta-threadekkel\/"},"modified":"2006-05-05T14:58:56","modified_gmt":"2006-05-05T12:58:56","slug":"nunit-teszteles-sta-threadekkel","status":"publish","type":"post","link":"https:\/\/soci.hu\/blog\/index.php\/2006\/05\/05\/nunit-teszteles-sta-threadekkel\/","title":{"rendered":"NUnit tesztel\u00e9s STA threadekkel"},"content":{"rendered":"<p>Az NUnit GUI alapban MTA sz\u00e1lakkal, a kozolos tesztel\u0151 pedig STA sz\u00e1lakkal tesztel.<\/p>\n<p>Ha az app haszn\u00e1l COM interopot, akkor fontos lehet a tesztel\u0151 sz\u00e1l \u00e1llapota (ami mint tudjuk csak egyszer \u00e1ll\u00edthat\u00f3 be, kiv\u00e9ve, ha megh\u00edvjuk a CoUnititialize-t).<\/p>\n<p>Az NUnit b\u00e1rmelyik (GUI vs. Console) verzi\u00f3j\u00e1n\u00e1l be lehet konfigur\u00e1lni hogyan \u00e1ll\u00edtsa be a sz\u00e1lak \u00e1llapot\u00e1t.<\/p>\n<p>A k\u00f6vetkez\u0151t kell \u00edrni a tesztelt app konfigj\u00e1ba (nem az nunit konfigj\u00e1ba!):<\/p>\n<p><code>&lt;configSections&gt;<br \/>\n\u00a0 &lt;sectionGroup name=\"NUnit\"&gt;<br \/>\n\u00a0\u00a0\u00a0 &lt;section name=\"TestRunner\"<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 type=\"System.Configuration.NameValueSectionHandler\"\/&gt;<br \/>\n\u00a0 &lt;\/sectionGroup&gt;<br \/>\n&lt;\/configSections&gt;<\/code><\/p>\n<p><code>&lt;NUnit&gt;<br \/>\n\u00a0 &lt;TestRunner&gt;<br \/>\n\u00a0\u00a0\u00a0 &lt;add key=\"ApartmentState\" value=\"STA\" \/&gt;<br \/>\n\u00a0 &lt;\/TestRunner&gt;<br \/>\n&lt;\/NUnit&gt;<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Az NUnit GUI alapban MTA sz\u00e1lakkal, a kozolos tesztel\u0151 pedig STA sz\u00e1lakkal tesztel. Ha az app haszn\u00e1l COM interopot, akkor fontos lehet&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,4],"tags":[],"class_list":["post-22","post","type-post","status-publish","format-standard","hentry","category-net","category-szakmai-elet"],"_links":{"self":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/22","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=22"}],"version-history":[{"count":0,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/22\/revisions"}],"wp:attachment":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=22"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=22"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}