Unit Test – Web API

By | 31/07/2020

In this post, we will see how to implement Unit Tests for the Web API created in the post: Docker – Web API and Sql Server. First of all, we open Visual Studio and we add a xUnit Test Project called TestWebApiServices: Then, we add a file called UserControllerUnitTests, where we will define all objects… Read More »

Python – FizzBuzz

By | 28/07/2020

In this post, we will see how to resolve FizzBuzz using Python.We will create a function that takes a number as input and it will return “Fizz“, “Buzz” or “FizzBuzz“.The rules are: EXAMPLES:Fizz_buzz(3) -> “Fizz”Fizz_buzz(5) -> “Buzz”Fizz_buzz(15) -> “FizzBuzz”Fizz_buzz(4) -> “4” SOLUTION:We open Visual Studio Code and we create a file called FizzBuzz: [FIZZBUZZ.PY] If we… Read More »

SwiftUI – Custom Botton style

By | 21/07/2020

In this post, we will see how to create a custom button style in Swift. First of all, we create a swift project and we add, in the file ContentView, this code: [CONTENTVIEW.SWIFT] Obviously the application is very easy, but it isn’t the principal goal of the the post. If we run the application, this… Read More »

Unit Test – Unit Test in Swift

By | 17/07/2020

In this post, we will see how to create a Unit Test in Swift, in order to test a function called IsNumberEven used to check if a number in input is either even or odd. First of all, we create a Swift file called Core, where we will define the function IsNumberEven: [CORE.SWIFT] Obviously function… Read More »

Angular – Environment Variables

By | 10/07/2020

In this post, we will see how to use environment variables in Angular. We will use the same Angular project created for the post How to Dockerize an Angular application and we will add a call at the Web API Service that I have deployed on Docker.hub: First of all, we run the Docker image… Read More »

React – How to render a list

By | 07/07/2020

In this post, we will see how to render a list of objects in React. First of all, we create a function component called listuser, where we will define a list of users: [LISTUSER.JS] Then, using the Javascript method map, we will display the list: Finally, we add the component listuser in App.js: If we… Read More »