Calabonga.DemoClasses 1.0.1

Simple data of people. For testing purposes only

Install-Package Calabonga.DemoClasses -Version 1.0.1
dotnet add package Calabonga.DemoClasses --version 1.0.1
<PackageReference Include="Calabonga.DemoClasses" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Calabonga.DemoClasses --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Usage

This library contains some classes and definitions that you can use for testing purposes in your projects:

Country (enum)

/// <summary>
/// Country enumeration
/// </summary>
public enum Country
{
    China, Russia, Ukraine, Germany, France
}

Person

/// <summary>
/// Simple class for testing
/// </summary>
public class Person {

    public int Id { get; set; }

    public string Name { get; set; }

    public string Description { get; set; }

    public string Gender { get; set; }

    public bool IsMember { get; set; }

    public int Age { get; set; }

    public int Weight { get; set; }

    public Country Country { get; set; }

    public DateTime MemberFromDate { get; set; }
}

Employee

/// <summary>
/// Employee
/// </summary>
public class Employee : Person
{
public int Salary { get; set; }

public int DepartmentId { get; set; }

}

Department

/// <summary>
/// Department
/// </summary>
public class Department {

public int Id { get; set; }

public string Name { get; set; }

public string Description { get; set; }

}

People

    public class People
    {
        public static List<Person> GetPeople()
        {
            return new List<Person>
            {
                new Person
                {
                    Id = 1,
                    MemberFromDate = new DateTime(2001, 12, 1),
                    Country = Country.Ukraine,
                    IsMember = true,
                    Name = "Tom",
                    Description = "Cook",
                    Age = 44,
                    Weight = 224,
                    Gender = "M"
                },
                new Person
                {
                    Id = 36,
                    MemberFromDate = new DateTime(1988, 2, 12),
                    Country = Country.Russia,
                    IsMember = true,
                    Name = "Олеся",
                    Description = "Инженер",
                    Age = 38,
                    Weight = 75,
                    Gender = "F"
                },
                
                // Omitted for brevity ...
                //...more than 30 items 
            };
        }

        public static List<Employee> GetEmployees()
        {
            return new List<Employee>
            {
                new Employee
                {
                    Salary = 1000,
                    DepartmentId = 1,
                    Country = Country.Germany,
                    IsMember = false,
                    Name = "Bob",
                    Description = "Student",
                    Age = 13,
                    Weight = 114,
                    Gender = "M"
                },
                new Employee
                {
                    Salary = 2220,
                    DepartmentId = 2,
                    Country = Country.Germany,
                    IsMember = false,
                    Name = "Robert",
                    Description = "Student",
                    Age = 12,
                    Weight = 99,
                    Gender = "M"
                },
               
               // Omitted for brevity
               // ... more than 10 item ...
            };
        }

        public static List<Department> GetDepartments()
        {
            return new List<Department>
            {
                new Department {
                            Id = 1, 
                            Name = "Global", 
                            Description = "Simple description number one"
                        },
                new Department {
                            Id = 2, 
                            Name = "Entertaiment", 
                            Description = "Simple description number two"
                        },
                new Department {
                            Id = 3, 
                            Name = "Office", 
                            Description = "Simple description number one"
                        }
            };
        }
    }

Usage

This library contains some classes and definitions that you can use for testing purposes in your projects:

Country (enum)

/// <summary>
/// Country enumeration
/// </summary>
public enum Country
{
    China, Russia, Ukraine, Germany, France
}

Person

/// <summary>
/// Simple class for testing
/// </summary>
public class Person {

    public int Id { get; set; }

    public string Name { get; set; }

    public string Description { get; set; }

    public string Gender { get; set; }

    public bool IsMember { get; set; }

    public int Age { get; set; }

    public int Weight { get; set; }

    public Country Country { get; set; }

    public DateTime MemberFromDate { get; set; }
}

Employee

/// <summary>
/// Employee
/// </summary>
public class Employee : Person
{
public int Salary { get; set; }

public int DepartmentId { get; set; }

}

Department

/// <summary>
/// Department
/// </summary>
public class Department {

public int Id { get; set; }

public string Name { get; set; }

public string Description { get; set; }

}

People

    public class People
    {
        public static List<Person> GetPeople()
        {
            return new List<Person>
            {
                new Person
                {
                    Id = 1,
                    MemberFromDate = new DateTime(2001, 12, 1),
                    Country = Country.Ukraine,
                    IsMember = true,
                    Name = "Tom",
                    Description = "Cook",
                    Age = 44,
                    Weight = 224,
                    Gender = "M"
                },
                new Person
                {
                    Id = 36,
                    MemberFromDate = new DateTime(1988, 2, 12),
                    Country = Country.Russia,
                    IsMember = true,
                    Name = "Олеся",
                    Description = "Инженер",
                    Age = 38,
                    Weight = 75,
                    Gender = "F"
                },
                
                // Omitted for brevity ...
                //...more than 30 items 
            };
        }

        public static List<Employee> GetEmployees()
        {
            return new List<Employee>
            {
                new Employee
                {
                    Salary = 1000,
                    DepartmentId = 1,
                    Country = Country.Germany,
                    IsMember = false,
                    Name = "Bob",
                    Description = "Student",
                    Age = 13,
                    Weight = 114,
                    Gender = "M"
                },
                new Employee
                {
                    Salary = 2220,
                    DepartmentId = 2,
                    Country = Country.Germany,
                    IsMember = false,
                    Name = "Robert",
                    Description = "Student",
                    Age = 12,
                    Weight = 99,
                    Gender = "M"
                },
               
               // Omitted for brevity
               // ... more than 10 item ...
            };
        }

        public static List<Department> GetDepartments()
        {
            return new List<Department>
            {
                new Department {
                            Id = 1, 
                            Name = "Global", 
                            Description = "Simple description number one"
                        },
                new Department {
                            Id = 2, 
                            Name = "Entertaiment", 
                            Description = "Simple description number two"
                        },
                new Department {
                            Id = 3, 
                            Name = "Office", 
                            Description = "Simple description number one"
                        }
            };
        }
    }

Release Notes

Some markdown added

  • .NETCoreApp 3.0

    • No dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.1 93 2/1/2020
1.0.0 81 10/5/2019