After completing the PluralSight course “Mocking with Moq 4 and xUnit” I decided to look for examples of Moq mocking a database. This post is based on my experience and comments on the article Unit Test Through Mocking Using MOQ Framework by Chinmay Dey published Dec 26, 2018. Continue reading “Order Processing Testing – Moq 4 and xUnit”
In this post we will develop a simple calculator able to add, subtract, multiply and divide.
The code will be implemented in C# using Visual Studio 2022.
Once we have the main code operational, we will add xUnit and will test using Moq4.
Let’s start by showing some output from our simple calculator. Continue reading “Calculator in C#”
At work each month a set of hours are set aside/scheduled for employees to learn something new. I have worked at more than a dozen companies and have never seen a periodic time scheduled in the company calendar for it. Yesterday we had eight hours scheduled for learning. During that time an invite for a one hour presentation UnsafeCSharp showed up. I watched and enjoyed it. In addition most presentations at work are recorded so I am planning on watching it again later today.
As I am writing this post I am not sure if there are things that were presented that are company confidential. For that reason, at this time I am not disclosing the name of the presenter or will dive into specific topics. Continue reading “Notes from the UnsafeCSharp Presentation”
Hope your weekend is going well. I will start with an unrelated event to the main subject of this post.
When I was working at my first job in Minneapolis, Minnesota the Red Cross would stop by at work for blood drives. They made it simple, so I started to give blood once a year.
Time went by and I decided to do it twice a year (one for my wife and one for me). I had my first appointment for 2023 last Friday afternoon. All went well as usual up to the point in which after the gauze was taped to my arm to protect the area from which the needle was removed. The technician offered a bandage to put pressure over the gauze to protect it for a couple hours. I have always declined and this time was no different. Continue reading “First ChatGPT Post – Populate Binary Tree”
Due to the COVID-19 pandemic, the last couple years Donald Knuth professor emeritus at Stanford University was not able to generate/present The Annual Christmas Lectures. For this past year (today is January 01, 2023 – Happy New Year!) he generated Stanford Lecture: Don Knuth – Twintrees, Baxter Permutations, and Floor Plans (2022). When you read the title it is hard to imagine how the three topics could be connected. My suggestion is to watch the video in which the topics are presented. Towards the end of the video the relationships are discovered. Not only that, but a set of four C programs are provided so one may experiment with the concepts. Continue reading “Stanford Lecture: Don Knuth – Twintrees, Baxter Permutations, and Floorplans (2022)”