Now that we've put together all of the MVVM components, we're going to take a quick look at the testing across these components. View Model Tests We have already looked at the Player unit test in Lesson 2.1. Now, let's create some tests for the GameSession view model. In the SimpleRPG.Game.Engine.Tests project, create the GameSessionTests … Continue reading Lesson 2.4: Testing the MVVM Components
Tag: Blazor
Lesson 2.3: Connecting Player – GameSession – Game Screen
We are going to complete the MVVM cycle by defining the view for our game - the Game Screen - to display and interact with the GameSession view model and the Player class. As a reminder of the MVVM design pattern: Fig 1 - MVVM pattern diagram To enable the View portion of this pattern, … Continue reading Lesson 2.3: Connecting Player – GameSession – Game Screen
Lesson 1.10: Building Game Splash Screen
After launching the game a few times, I have already gotten tired of seeing the default "Loading..." message on every startup. Luckily there is a way to build our own application splash screen that will display while the Blazor WebAssembly loads on the page. Let's revisit the "./wwwroot/index.html" file. We edited this file earlier to … Continue reading Lesson 1.10: Building Game Splash Screen
Lesson 1.8: bUnit to Test Blazor Components
Testing source code is one part of what we need for our game. Since we're building on Blazor, we're going to need a way to test Blazor components as well. And while a lot of Blazor is just plain C# classes that extend and render controls. There is an infrastructure in place to render those … Continue reading Lesson 1.8: bUnit to Test Blazor Components
Lesson 1.6: Basic Screen Layout
We've done a lot of setup to this point. Let's change gears for a lesson and focus on setting up the basic layout of the game screen. We want to segment the screen up into several areas, which we will do by using the grid concept in Bootstrap CSS. Updating MainLayout Our game looks more … Continue reading Lesson 1.6: Basic Screen Layout
Lesson 1.5: Using Blazorise Component Library
Components are the basic unit of development in Blazor. A component is a self-contained chunk of user interface (UI), such as a page, dialog, or form. A component includes HTML markup and the processing logic required to inject data or respond to UI events. Components are flexible and lightweight. They can be nested, reused, and … Continue reading Lesson 1.5: Using Blazorise Component Library
Lesson 1.4: Create Initial Blazor Project
Now that we have a source repository (from lesson 1.3) for our work, we're going to create the initial Blazor application project. Let's start by launching Visual Studio 2019. The first thing we will see is a dialog where we can clone code, open projects, create projects, etc. We are going to start by cloning … Continue reading Lesson 1.4: Create Initial Blazor Project