{"id":254053,"date":"2015-03-30T12:21:02","date_gmt":"2015-03-30T08:21:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=254053"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=254053","title":{"rendered":"\u041b\u044e\u0431\u0438\u0442\u0435 \u043b\u0438 \u0432\u044b Assert.That \u0442\u0430\u043a, \u043a\u0430\u043a \u0435\u0433\u043e \u043b\u044e\u0431\u044f\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u043b\u0438 \u0432\u044b\u0445\u043e\u0434\u0443 \u0431\u0435\u0442\u044b NUnit v3 \u043f\u043e\u0441\u0432\u044f\u0449\u0430\u0435\u0442\u0441\u044f"},"content":{"rendered":"<p>     \t\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0431\u044b\u043b\u0430 \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u0430 \u043f\u0435\u0440\u0432\u0430\u044f \u0431\u0435\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 <a href=\"http:\/\/www.nunit.org\/\">NUnit v3<\/a>. \u041a\u0440\u043e\u043c\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e, \u044d\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432 (\u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u00ab\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u00bb). \u042f \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u0447\u0442\u043e \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f nunit-\u0430 <a href=\"http:\/\/nunit.org\/index.php?p=breakingChanges&amp;r=3.0\">\u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442<\/a> \u0447\u0430\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432\u0435\u0449\u0435\u0439 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u043e \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u0430 ExpectedException \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Assert.Thorws \u0438\u043b\u0438 Assert.That.<br \/>  \u041d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0440\u0435\u043b\u0438\u0437\u0430 \u044d\u0442\u043e\u0439 \u0431\u0435\u0442\u044b, \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043d\u0430\u0447\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c <a href=\"http:\/\/www.nunit.org\/index.php?p=constraintModel&amp;r=2.4.8\">Assert.That<\/a> \u0432\u043c\u0435\u0441\u0442\u043e \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 nunit-\u0430. <\/p>\n<p>  \u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u043f\u044b\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u0430 ExpectedException \u0432 \u043c\u043e\u0434\u0435\u043b\u044c Assert.That.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u041a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u043f\u043e\u0434 nunit v3. \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0431\u043e\u043b\u0435\u0435 100 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0439 \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u0430 <a href=\"http:\/\/www.nunit.org\/index.php?p=exception&amp;r=2.4.8\">ExpectedException<\/a>. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043a\u0430\u043a \u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430.<\/p>\n<p>  \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0440\u0430\u043d\u044c\u0448\u0435 \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442 ExpectedException \u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u0430\u0447\u043d\u044b\u043c, \u0442\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c:<br \/>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0442\u0435\u0441\u0442\u0435 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0432 \u043a\u0430\u043a\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f. \u041e\u0431\u044b\u0447\u043d\u043e \u2014 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439, \u043d\u043e \u0435\u0441\u043b\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u0432\u044b\u043a\u0438\u043d\u0435\u0442 \u044d\u0442\u0443 \u0436\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u0442\u043e \u0442\u0435\u0441\u0442 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u0442\u044c \u0442\u0443\u0442 \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u00ab\u0433\u0434\u0435 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043e\u0436\u0438\u0434\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e\u00bb.  <\/p>\n<pre><code class=\"cs\">        [Test]         [ExpectedException(typeof(ArgumentException))]         public void TestExpectedException()         {             foo1();             foo4();             foo1();         } <\/code><\/pre>\n<p>  \u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u043c\u0435\u043b\u043e\u0447\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u0435\u0448\u0430\u0435\u0442, \u044d\u0442\u043e \u043e\u0442\u0447\u0435\u0442\u044b \u043f\u043e \u00ab\u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044e \u043a\u043e\u0434\u0430\u00bb, \u0442.\u0435. \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0448\u044c <a href=\"https:\/\/www.jetbrains.com\/dotcover\/\">dotCover<\/a>, \u0438\u0437\u0443\u0447\u0430\u0435\u0448\u044c \u043e\u0442\u0447\u0435\u0442 \u0438 \u0432\u0438\u0434\u0438\u0448\u044c:<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/a2a\/a64\/3b8\/a2aa643b8b7a4eb1b740cc6ad76829e5.png\"\/><\/p>\n<p>  \u0410 \u0432\u043e\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0448\u044c \u043d\u0430 Assert.That \u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0435 \u0434\u0435\u043b\u043e: \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0448\u044c 100% \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/7a2\/001\/6c7\/7a20016c712143088db620597ef1cb72.png\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u044f \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u00ab\u0440\u0443\u043a\u0430\u043c\u0438\u00bb \u044d\u0442\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431:), \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f \u0440\u0435\u0448\u0430\u0440\u043f\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 nunit \u0432 \u043c\u043e\u0434\u0435\u043b\u044c Assert.That. <\/p>\n<p>  \u0418 \u043d\u0430\u0447\u0430\u043b \u044f \u0441 \u0442\u0435\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u043c\u043e\u0435\u0433\u043e \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  \u0421\u043f\u0435\u0440\u0432\u0430 \u0432\u0441\u0435 \u0431\u044b\u043b\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e:  <\/p>\n<pre><code class=\"cs\">        [Test]         [ExpectedException]         public void TestShortExpectedException()         {             foo1();             foo2();             foo1();         } <\/code><\/pre>\n<p>  \u043f\u0435\u0440\u0435\u0432\u0435\u043b \u0432   <\/p>\n<pre><code class=\"cs\">        [Test]         public void TestShortExpectedException()         {             foo1();             Assert.That(foo2, Throws.Exception);             foo1();         } <\/code><\/pre>\n<p>  \u0411\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u043e\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430  <\/p>\n<pre><code class=\"cs\">        [Test]         [ExpectedException]         public void TestExpectedExceptionWithExpressions()         {             double i = 2 + getNumber();         } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cs\">        [Test]         public void TestExpectedExceptionWithExpressions()         {             Assert.That(() =&gt; { double i = 2 + getNumber(); }, Throws.Exception);         } <\/code><\/pre>\n<p>  \u041a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0442\u0438\u043f \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <b>Throws.TypeOf<\/b>  <\/p>\n<pre><code class=\"cs\">        [Test]         [ExpectedException(typeof(ArgumentException))]         public void TestExpectedException()         {             foo1();             foo4();             foo1();         } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cs\">        [Test]         public void TestExpectedException()         {             foo1();             Assert.That(() =&gt; { foo4(); }, Throws.TypeOf&lt;ArgumentException&gt;());             foo1();         } <\/code><\/pre>\n<p>  \u041e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0442\u0430\u0443\u0446\u0438\u0438 (\u0438\u043b\u0438 \u043f\u043e-\u0440\u0443\u0441\u0441\u043a\u0438 \u00ab\u043c\u0435\u0441\u0430\u0434\u0436 \u044d\u043a\u0441\u0435\u043f\u0448\u0438\u043d\u0430\u00bb) \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c <b>.And.Message<\/b>  <\/p>\n<pre><code class=\"cs\">        [Test]         [ExpectedException(typeof(NotImplementedException), ExpectedMessage = &quot;customer message&quot;)]         public void TestExpectedExceptionWithCustomerMessage()         {             foo4(&quot;customer message&quot;);         } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cs\">        [Test]         public void TestExpectedExceptionWithCustomerMessage()         {             Assert.That(() =&gt; { foo4(&quot;customer message&quot;); }, Throws.TypeOf&lt;NotImplementedException&gt;().And.Message.EqualTo(&quot;customer message&quot;));         } <\/code><\/pre>\n<p>  \u041f\u043e\u043a\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0432\u0441\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <b>MathType<\/b> \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.  <\/p>\n<pre><code class=\"cs\">        [Test]         [ExpectedException(typeof(NotImplementedException), ExpectedMessage = &quot;customer message&quot;, MatchType = MessageMatch.Contains)]         public void TestExpectedExceptionWithCustomerMessage()         {             foo4(&quot;my customer message&quot;);         } <\/code><\/pre>\n<p>  \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 Assert.IsNullOrEmpty and Assert.IsNotNullOrEmpty \u0440\u0435\u0430\u043b\u0438\u0437\u0432\u0430\u043b \u0431\u0435\u0437 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/www.jetbrains.com\/resharper\/webhelp80\/Reference__Options__Code_Inspection__Custom_Patterns.html\">Custom Patterns<\/a>.<br \/>  Custom Patterns \u2014 \u0444\u0438\u0447\u0430 \u0441\u0438\u043b\u044c\u043d\u0430\u044f, \u043d\u043e, \u0441\u0443\u0434\u044f \u043f\u043e \u0432\u0441\u0435\u043c\u0443, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u043d\u0435 \u0432\u0441\u0435 \u0435\u0449\u0435 \u0433\u043b\u0430\u0434\u043a\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<br \/>  Assert \u2014 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435 \u0431\u044b\u043b\u043e:<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/545\/55d\/434\/54555d434eb54d92b81e5684ff6cb69f.png\"\/><br \/>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/aa1\/12a\/60c\/aa112a60ce8246d3972d5b0a75b76bd5.png\"\/><\/p>\n<p>  \u041f\u043b\u0430\u0433\u0438\u043d \u043d\u0430\u0437\u0432\u0430\u0435\u0442\u0441\u044f \u00abNUnit.That.Resharper.Plugin\u00bb \u0438 \u0435\u0433\u043e \u0431\u0435\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0434\u043b\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u00abResharper \u2014 Manage Extensions\u00bb.<br \/>  \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 resharper-\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 8.2.<br \/>  \u041f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441 <a href=\"https:\/\/github.com\/constructor-igor\/NUnit.That.Resharper.Plugin\">\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439<\/a>.<\/p>\n<p>  \u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p>  \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0448\u044c \u043d\u0430 \u043d\u0443\u0436\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 Replace<br \/>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/fb1\/d7b\/110\/fb1d7b110d874e08aedd2d1264a35c35.png\"\/><\/p>\n<p>  \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0448\u044c \u0441\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 (\u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442 ExpectedException \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f)<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/cea\/550\/f8a\/cea550f8a98c47d89deada85556a7ff6.png\"\/><\/p>\n<p>  <b>\u0412\u044b\u0432\u043e\u0434\u044b<\/b>:<br \/>   \u2014 Assert.That \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e;<br \/>   \u2014 NUnit v3. \u043f\u043e\u043a\u0430 \u0435\u0449\u0435 \u0431\u0435\u0442\u0430 (\u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e \u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439!), \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0436\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044f\u0442\u044c \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435;<br \/>   \u2014 \u043f\u043e\u043b\u043d\u044b\u0439 \u0446\u0438\u043a\u043b (<b>\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0442\u0435\u0441\u0442\u044b \u0438 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0446\u0438\u044e<\/b>) \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0434\u043b\u044f \u0440\u0435\u0448\u0430\u0440\u043f\u0435\u0440\u0430 \u0432\u0435\u0449\u044c \u043d\u0435 \u0442\u0430\u043a\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u0430\u044f, \u043a\u0430\u043a \u043c\u043e\u0433\u043b\u043e \u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u00ab\u043e\u0431\u0449\u0438\u0445\u00bb, \u043d\u043e \u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c.<\/p>\n<p>  \u0425\u043e\u0442\u0435\u043b \u0431\u044b \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u044c \u043e\u0441\u043e\u0431\u0443\u044e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0435 resharper-\u0430 (\u0438 \u043b\u0438\u0447\u043d\u043e  <a href=\"http:\/\/habrahabr.ru\/users\/mezastel\/\" class=\"user_link\">mezastel<\/a>), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u0438 \u0432\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0432 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432. Resharper SDK \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u044b Visual Studio \u0438\u0437 \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442\u043e\u0432, \u0447\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u0435\u0442 \u0434\u0435\u043b\u043e.<\/p>\n<p>  \u0421\u0441\u044b\u043b\u043a\u0438:<br \/>   \u2014 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431\u0435 <a href=\"https:\/\/github.com\/constructor-igor\/NUnit.That.Resharper.Plugin\">https:\/\/github.com\/constructor-igor\/NUnit.That.Resharper.Plugin<\/a><br \/>   \u2014 \u043f\u043b\u0430\u0433\u0438\u043d <b>NUnit.That.Resharper.Plugin<\/b> \u0432 \u0433\u0430\u043b\u0435\u0440\u0438\u0438 <a href=\"https:\/\/resharper-plugins.jetbrains.com\/packages\/NUnit.That.Resharper_v8.Plugin\/\">https:\/\/resharper-plugins.jetbrains.com\/packages\/NUnit.That.Resharper_v8.Plugin\/<\/a><\/p>\n<p>  \u0421\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<br \/>   \u2014 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 resharper-\u0430 <a href=\"https:\/\/www.jetbrains.com\/resharper\/devguide\/\">ReSharper DevGuide<\/a>;<br \/>   \u2014 \u043f\u043e\u0441\u0442 &quot;<a href=\"http:\/\/dev-ua.livejournal.com\/774.html\">\u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f ReSharper \u2014 \u043d\u0435 \u0442\u0430\u043a \u0438 \u0441\u043b\u043e\u0436\u043d\u043e<\/a>&quot;<br \/>   \u2014 <a href=\"https:\/\/github.com\/hmemcpy\/AgentMulder\">Agent Mulder plugin for ReSharper<\/a>     \t<\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/254289\/\"> http:\/\/habrahabr.ru\/post\/254289\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>     \t\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0431\u044b\u043b\u0430 \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u0430 \u043f\u0435\u0440\u0432\u0430\u044f \u0431\u0435\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 <a href=\"http:\/\/www.nunit.org\/\">NUnit v3<\/a>. \u041a\u0440\u043e\u043c\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e, \u044d\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432 (\u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u00ab\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u00bb). \u042f \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u0447\u0442\u043e \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f nunit-\u0430 <a href=\"http:\/\/nunit.org\/index.php?p=breakingChanges&amp;r=3.0\">\u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442<\/a> \u0447\u0430\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432\u0435\u0449\u0435\u0439 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u043e \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u0430 ExpectedException \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Assert.Thorws \u0438\u043b\u0438 Assert.That.<br \/>  \u041d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0440\u0435\u043b\u0438\u0437\u0430 \u044d\u0442\u043e\u0439 \u0431\u0435\u0442\u044b, \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043d\u0430\u0447\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c <a href=\"http:\/\/www.nunit.org\/index.php?p=constraintModel&amp;r=2.4.8\">Assert.That<\/a> \u0432\u043c\u0435\u0441\u0442\u043e \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 nunit-\u0430. <\/p>\n<p>  \u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u043f\u044b\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u0430 ExpectedException \u0432 \u043c\u043e\u0434\u0435\u043b\u044c Assert.That.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-254053","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/254053","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=254053"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/254053\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=254053"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=254053"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=254053"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}