-
Linux Bash scripting: Mixed topics
Debugging Let’s assume we have a bash script like this: test.sh: If we run this script with bash command: bash ./test.sh We get for example the following result, if the file does not exist: File not found But with the help of -x option we can add a bit of debugging and see a bit…
-
Web API & Balzor: Mixed topics
Troubleshooting Ok Response arrives but content is missing Problem We try to consume a value from a Web API method from Blazor. The Response has the Ok status, but the content is always null even though we are sure that we are indeed sending a content back. Here is an example of such a scenario…
-
Flutter/Dart Drawing examples
Here in this post we collect some simple Flutter/Dart drawing examples. Drawing a line The first example shows how we can draw a line. The output of this example looks like this: Here is the code for this examples: The example uses a CustomPaint widget, which uses the custom painter LinePainter, which is a simple…
-
Flutter/Dart: Troubleshooting
Error: Unable to locate Android SDK Problem After executing flutter doctor the following errors are issued: Resolution For Windows: Inside Android Studio, get path from: gear icon > Apprearance & Behavior > System Settings > Android SDK > Android SDK Location Make sure that the location path does not contain any spaces in it. In…
-
Cypress & OAuth
The problem As we know OAuth based authentication and identity plattform implementations rely on a third party. So you don’t have just your client and your server where the web application is running, but you also have a third entity which manages the authentication. This and of itself is a source of problems for Cypress,…
-
ASP.NET WebAPI & Blazor WebAssembly
Creating the template-based solution This is an example project on how to create a web application with an ASP.NET WebAPI backend and a Blazor WebAssembly frontend. We use VS 2022 for this example. Select project template [Blazor Webassembly App]: Select the option [ASP.NET Core hosted]. This will create the ASP.NET WebAPI backend: VS creates a…
-
moq: Practical examples
Mocking Mocking Properties Mocking Public Properties Example: Mocking Protected Properties Example: Mocking Complex Property Types Mocking Collection Properties You cannot mock a complex property type such as a List-Property like a simple property e. g. a property of DateTime type: Instead you have to mock such collection property in a similar fashion like a method:…
-
Next.js: A simple example including unit test
Windows WSL-based Next.js “Hello world” Make sure that you have WSL installed and ready on your Windows machine. Make sure that Node.js is installed in your WSL environment. Open a WSL command line Create a new project folder: mkdir NextProjects Navigate into that directory: cd NextProjects Install Next.js and create a project (e.g. my-next-app): npx…
-
NodeJS: Mixed topics
Chained Middleware The following example shows how we can chain multiple (in this case two) middlewares. The first middleware is a logger function, which writes ‘Request arrived’ in the terminal window where the NodeJS web app (app.js) was started. The second middleware is a time function, which stored the request time in a property. The…
-
Pact.NET: Bi-Directional CT & DevOps Pipelines
Overview Here we add examples of how different parts of the DevOps YAML-based provider and consumer pipelines for a Pact.NET-based bi-directional contract testing solution could be implemented. This implementation example assumes a .NET-based provider and consumer. But the idea can pretty easily be transferred to non .NET-based providers and or consumers. The reason we have…