xUnit Theory: Working With InlineData, MemberData, ClassData

xUnit support two different types of unit test, Fact and Theory. We use xUnit Fact when we have some criteria that always must be met, regardless of data. For example, when we test a controller’s action to see if it’s returning the correct view. xUnit Theory on the other hand depends on set of parameters … 

 

Seven Dotnet Newsletter You Might Want To Subscribe To

There are numbers of .Net newsletters that I personally subscribe to, it helps me find out what’s new in .Net world. So in this post, I’m going to introduce seven Dotnet newsletter that I think worth subscribing to. The Morning Brew In my opinion, this is the best Dotnet newsletter you can subscribe to, if … 

 

Mock HttpClient Without Wrapper Using HttpMessageHandler

There is a lot of discussion on github about why HttpClient doesn’t have an interface, despite the long winded discussion on github about the subject, I think mocking the HttpClient isn’t that hard. We can solve this problem with a wrapper, but wrappers are not a good idea if we can somehow avoid using them, … 

 

Structuring JavaScript Code In Asp.Net MVC Application

In this post I’m going to show you how I structure my JavaScript code in most of my Asp.Net MVC apps, I’m writing this because this approach helped me a lot, and maybe because someone out there has a better approach than mine and let me know. The Problem As a web developer who uses … 

 

12 Visual Studio 2015 Extensions You Might Find Useful

I previously wrote about some Visual Studio extensions that I though was most useful here, I think that list still stands. But in this post I’m going to introduce less known extensions that I think might be useful, but not essential. Viasfora Viasfora adds tons of features to your code formatting experience, from code rain … 

 

How To Use IActionResult Abstraction To Achieve Graceful Degradation

You might have heard the term graceful degradation, as you know this term is kind of broad, but most of the time it refers to the page usability and the fact that when you rely on some language that are not available everywhere, the page still will be usable, w3’s article Graceful degradation versus progressive … 

 

Importance Of Language And Its Effect On Research

I’m not a native English speaker, as a result, I’m more sensitive to the author’s use of words when reading, by sensitive I mean, I’m more prone to misunderstand it, this was especially true at the beginning of my career. Sometimes when I read, I would ask myself why would the author even needed to … 

 

Four C# Code Analyzers That Worth Your Time

With the advent of .NET Compiler Platform (code-named “Roslyn”), it became possible to build code analyzers for languages like C# with ease. In the past, only big companies like JetBrains or DevExpress with a lot of resources could build a code analyzer, because building it involved writing your own compiler for that purpose. Now the … 

 

Dynamically Building JSON Tree For Use In Javascript Components Using C#

These days, many JavaScript components use JSON when it comes to working with data, the reason is obvious enough, but some components that build some kind of tree structure like this one, are going to need a JSON tree. Building a static JSON tree is easy, but how do you build a dynamic JSON tree … 

 

How To Show Currently Online Users (Members) Using Asp.Net MVC And Identity

How To Show Currently Online Users (Members) Using Asp.Net MVC Identity Introduction In this post, I’m going to show you how to implement a feature to show who is online, and a link to their profile(which not implemented in my sample). In the old Membership system of ASP.NET, things were a little easier, you could …