Show / Hide Table of Contents

Class TestUtils

Inheritance
System.Object
TestUtils
Namespace: Eco.Gameplay.Utils
Assembly: Eco.Gameplay.dll
Syntax
[ChatCommandHandler]
public static class TestUtils : Object

Fields

TestClientUsername

Declaration
public const string TestClientUsername = "Test Client"
Field Value
Type Description
System.String

Properties

TestUser

Declaration
public static User TestUser { get; }
Property Value
Type Description
User

Methods

Demote(User)

Declaration
[ChatSubCommand]
public static void Demote(User user)
Parameters
Type Name Description
User user

GetOrCreateOtherUser(User)

Declaration
public static User GetOrCreateOtherUser(User current)
Parameters
Type Name Description
User current
Returns
Type Description
User

GetOrCreateOtherUsers(Int32, Boolean, String)

Get an enumerable of test users, creating new ones as needed (or forcing only new ones if set to true)

Declaration
public static IEnumerable<User> GetOrCreateOtherUsers(int count, bool newUsersOnly = false, string nameBase = null)
Parameters
Type Name Description
System.Int32 count
System.Boolean newUsersOnly
System.String nameBase
Returns
Type Description
System.Collections.Generic.IEnumerable<User>

GetOrCreateOtherUsers(Int32, IEnumerable<User>)

Declaration
public static IEnumerable<User> GetOrCreateOtherUsers(int count, IEnumerable<User> existingUsers)
Parameters
Type Name Description
System.Int32 count
System.Collections.Generic.IEnumerable<User> existingUsers
Returns
Type Description
System.Collections.Generic.IEnumerable<User>

GetOrCreateTestTile(User)

Declaration
public static AppointedTitle GetOrCreateTestTile(User user = null)
Parameters
Type Name Description
User user
Returns
Type Description
AppointedTitle

MakeTestUser()

Declaration
public static User MakeTestUser()
Returns
Type Description
User

MakeTestUser(String)

Declaration
public static User MakeTestUser(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
User

MakeTestUsers(User, Int32)

Declaration
[ChatSubCommand]
public static void MakeTestUsers(User user, int count = 5)
Parameters
Type Name Description
User user
System.Int32 count

MakeTUser(User, String)

Declaration
[ChatSubCommand]
public static User MakeTUser(User caller = null, string name = null)
Parameters
Type Name Description
User caller
System.String name
Returns
Type Description
User

NewTwitchUser()

Return a name for a new twitch user. Note that this doesnt persist after server restarts, it will go back to 1.

Declaration
public static string NewTwitchUser()
Returns
Type Description
System.String

QAMode(IChatClient)

Declaration
[ChatSubCommand]
public static void QAMode(IChatClient client)
Parameters
Type Name Description
IChatClient client

UserOrTestUser(IChatClient)

If the chat client is already a user, use that. Otherwise, return a test user.

Declaration
public static User UserOrTestUser(this IChatClient client)
Parameters
Type Name Description
IChatClient client
Returns
Type Description
User
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾