One of common things that I unit test with NUnit is testing throwing or not throwing a specific exception. This is done using Assert.Throws and Assert.DoesNotThrow. I used to write 2 method for a exception assert unit test. One that do the actual work and one for unit test previous method. Consider following: pubic void …
ماه: ژانویه 2011
We have a typical web application that its data access layer is written using Castle ActiveRecord. Castle ActiveRecord exposes NHibernate’s SchemUpdate feature. This feature lets us to upgrade schema/database with current changes in domain entities. One odd problem with SchemaUpdate was that in many cases it was generating foreign keys again without any change in …
حتماً تا حالا دیدهاید که هر وقت پروژهای را در ویژوال استودیو Build میکنید در کنار فهرست Errorها، فهرستی از Warningها هم نمایش داده میشود. این Warningها مواردی هستند که کامپایلر C# تشخیص داده و برای بررسی بیشتر به شما اعلام میکند. این Warningها شامل مسائلی ساده و معمولی هستند مثل: یک return وسط متود …
«فردیس» یک پروژهی Open Source خیلی کوچک است که برای کار با یونیکد ایجاد شده است. «فردیس» در یک دورهی زمانی که به شدت نیاز به این داشتیم که بفهمیم فلان کلید صفحه کلید یا فلان کاراکتر دقیقاً کدام نویسهی یونیکد است، کد آن چیست، نام رسمی آن در یونیکد چیست و در فونتهای مختلف …
Fardis is a tiny open source project regarding Unicode and Persian/Arabic. Once a time I was in need to know more info about characters. Specially I needed to know what’s Unicode name and code of a specific character. So I created “Farids” as an .Net/C# and Windows desktop application/library. Along with time I decided “Fardis” …
یکی از معضلات همیشگی شرکتهای نرمافزاری کمبود وقت برای آموزش و اطلاعرسانی است. یکی از راهکارهای مورد استفاده در کشورهای پیشرفتهتر استفاده از «جلسات ناهاری» یا به قول خودشان Brown Bag Session است. این طور جلسات به طور غیر رسمی و به منظور آموزش یا اطلاعرسانی دربارهی یک موضوع خاص برگزار میشود. این جلسات در …