افزونهی ReSharper بهدلیل یکپارچه کردن امکان استفاده از NUnit در ویژوال استودیو، یکی از انتخابهای اول جهت انجام آزمایشات واحد در این محیط به شمار میرود.
اخیرا آقای Genisio چند قالب ایجاد آزمونهای NUnit را مخصوص ReSharper ایجاد کردهاند، که در ادامه در مورد نحوهی استفاده از آنها توضیح داده خواهد شد.
پس از دریافت فایلها، برای استفاده، به منوی ReSharper گزینهی live templates مراجعه نمائید. سپس بر روی نوار ابزار صفحهی باز شده، روی دکمهی import کلیک نموده و فایلها را معرفی کنید.
NewTestFileTemplate.xml از نوع file template است.
TestTemplates.xml از نوع live template میباشد.
اکنون مجددا به منوی اصلی ReSharper مراجعه کنید و مسیر زیر را طی نمائید:
گزینهی Test اضافه شده را انتخاب کرده و سپس قسمت Add to quicklist را نیز انتخاب نمائید.
به این صورت گزینهی Test به این منو افزوده خواهد شد و هر بار که بر روی آن کلیک شود، یک کلاس حاضر و آماده مطابق قالب اصلی یک کلاس استاندارد NUnit برای شما ایجاد خواهد شد.
همچنین در این مجموعه یک سری live template نیز موجود است که کار آنها فعال سازی intellisense ویژوال استودیو جهت ایجاد یک سری متدها به صورت خودکار است. برای مثال اگر کلمهی test را تایپ کنید و سپس دکمهی tab و یا enter را فشار دهید، بلافاصله بدنهی خالی یک متد تست برای شما ایجاد خواهد شد.
سایر میانبرهای در نظر گرفته شده، به شرح زیر هستند:
setup – Create a [SetUp] method
teardown – Create a new [TearDown] method
ise – Assert that condition is equal to value
ist – Assert that condition is true
isf – Assert that condition is false
isn – Assert that condition is null
isnn – Assert that condition is not null
بروز رسانی جدید ویندوز 10 مهر 97
In this post I'll show how to create a logging provider that writes logs to the file system. In production, I'd recommended using a more fully-featured system like Serilog instead of this library, but I wanted to see what was involved to get a better idea of the process myself.
The code for the file logging provider is available on GitHub, or as the NetEscapades.Extensions.Logging.RollingFile package on NuGet.
افزونهی کروم برای دیباگ Wasm
DARPA Wants All C Converted To Rust
After more than two decades of grappling with memory safety issues in C and C++, the software engineering community has reached a consensus. It’s not enough to rely on bug-finding tools. The preferred approach is to use “safe” programming languages that can reject unsafe programs at compile time, thereby preventing the emergence of memory safety issues.