XUnit – Part 3: Action Based Assertions Assert.Raises and Assert.Throws

In my previous post, we saw how value and type based assertions works in xUnit. In this post I’m going to focus on assertions that check whether or not something happened. Specifically we look at assertions to check if an event is raised or an exception is thrown. Asserting if An Event Is Raised Let’s … 

 

XUnit – Part 2: Value and Type Based Assertions in xUnit

In xUnit and many other testing frameworks, assertion is the mean that we conduct our test. In other word we assert an expectation that something is true about a piece of code. There are many different types of assertion in xUnit that we can use. Normally assertions are based on different types of object, but … 

 

XUnit – Part 1: xUnit Packages and Writing Your First Unit Test

I one of my previous post I said I’m going to write a series of articles on xUnit. I’m going to start from the begging which is installing xUnit packages. I’m also going to explain a little about other frameworks that might be used with xUnit to complement it. In the future I’ll go in … 

 

Using Google Indexing API With Google API Client Library for .NET

Normally websites get indexed by google automatically. There’s also sitemap to help us announce what should be crawled by google or certain pages exist on our website. For each update of our website the search engine crawlers from google visit our website and update their indexes with our pages information. But waiting for google bots … 

 

Apply With LinkedIn: A Guide With Sample App

Recently my company wanted to use the Apply with LinkedIn feature on one of our ATS modules. This feature allows the applicant who want to apply for a job posting to fill the application form using their LinkedIn data. This saves them time by receiving their info from LinkedIn and filling the form instead of … 

 

Lambdas vs Local Functions What’s the Difference

We already had the ability to create a short anonymous methods that assigned to a variable in C#. We could achieve this using delegate keyword or using Action and Func. But with release of C# 7 local functions got introduced. It has some similarity  to lambdas but also some major differences. Local functions are functions … 

 

.Net Core 3 New Json API And Its Features

Until the release of .Net Core 3, the Asp.Net Core was dependent on Json.NET for its serialization. But with release of .Net Core 3, this dependency is removed and a new API is created. Not only there is no dependency on Json.Net in .Net Core 3 but also this new API is much faster than … 

 

Business Case For The Value Of Code Quality

Most of the time I’ve heard people talking about how sales and other things are much more important than technical aspect of a company. That can is true in most cases. But for the companies in software and technology sector is it different. This might be true at the startup phase but it does not … 

 

Functional Programming in C#: A Brief Guide

Functional Programming and its concepts are becoming more important to software industry and data driven applications. But for us to be able to benefit from functional programming we don’t have to use a strictly functional language like Haskell for example. We can follow the principles and patterns of functional programming even in object oriented languages … 

 

C# in parameter modifier

In version 7.2 of C# language, now we can pass an argument into a method without allowing the method to mutate the value. But the main reason this keyword is added to the language is not mutability. It was added for optimization and the need to pass a value type in a method by reference …