KullGames_ServerLists_TestDataGenerator 1.0.20241025.953

There is a newer version of this package available.
See the version list below for details.
dotnet add package KullGames_ServerLists_TestDataGenerator --version 1.0.20241025.953                
NuGet\Install-Package KullGames_ServerLists_TestDataGenerator -Version 1.0.20241025.953                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="KullGames_ServerLists_TestDataGenerator" Version="1.0.20241025.953" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add KullGames_ServerLists_TestDataGenerator --version 1.0.20241025.953                
#r "nuget: KullGames_ServerLists_TestDataGenerator, 1.0.20241025.953"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install KullGames_ServerLists_TestDataGenerator as a Cake Addin
#addin nuget:?package=KullGames_ServerLists_TestDataGenerator&version=1.0.20241025.953

// Install KullGames_ServerLists_TestDataGenerator as a Cake Tool
#tool nuget:?package=KullGames_ServerLists_TestDataGenerator&version=1.0.20241025.953                

TestDataGenerator for KullGames ServerLists

Overview

TestDataGenerator is a C# utility designed to generate realistic test data for Minecraft server listings and user profiles within the KullGames ecosystem. Built using the Bogus library, this generator creates sample users, servers, and server tags, allowing for easy testing and prototyping without the need for manual data entry.

Features

  • User Generation: Generates unique user profiles with attributes like username, email, and external provider details.
  • Server Generation: Produces a variety of server configurations, including game modes, features, modpacks, and player details.
  • Server Tag Generation: Creates relevant tags, associating servers with specific mods, features, and game modes.
  • Randomized Data: Provides realistic and randomized data based on the Bogus library, ensuring uniqueness and variability.
  • Configurable Generation: Adjustable to generate custom numbers of users, servers, or tags based on requirements.

Requirements

  • .NET 6.0+ SDK
  • Visual Studio 2022 or higher (optional for development)

Installation

Clone the repository and add the TestDataGenerator project to your solution. Then reference it in your testing or data-seeding projects.

git clone https://dev.azure.com/KullGamesRepo/KullGames/_git/KullGames_TestDataGenerator

Usage

Generating Users

To generate a list of users:

using TestDataGenerator;

var users = FakeDataGenerator.GenerateUsers(10); // Generates 10 random users

Generating Servers

To generate a list of servers:

using TestDataGenerator;

var servers = FakeDataGenerator.GenerateServers(5); // Generates 5 random servers

Generating Server Tags

To generate unique server tags:

using TestDataGenerator;

var tags = FakeDataGenerator.GenerateServerTags(10); // Generates 10 unique tags

Customization Options

Each Generate method accepts optional parameters such as Guid for specific IDs or ownerId for associating servers with a particular user. These methods return IEnumerable collections, making them easy to use in database seeding or testing scenarios.

Example

An example of generating and displaying servers with their details:

using System;
using TestDataGenerator;

var servers = FakeDataGenerator.GenerateServers(3);

foreach (var server in servers)
{
    Console.WriteLine($"Server Name: {server.Name}, Modpack: {server.Modpack}, Players: {server.CurrentPlayers}/{server.MaxPlayers}");
}

Project Structure

  • FakeDataGenerator: Main class with static methods to generate users, servers, and tags.
  • Data Lists: Pre-defined lists of mods, game modes, and features, allowing for realistic and thematically accurate test data.
  • Utilities: Helper methods for creating collections of tags or associating tags with specific servers.

Contributing

Contributions are encouraged! Please fork the repository, make your updates, and submit a pull request.

License

This project is licensed under the CC BY-NC 4.0 License - see the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.20241028.964 71 10/28/2024
1.0.20241025.953 69 10/25/2024

Initial release.