using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TestUserCreationScreen : MonoBehaviour
{
    void Start()
    {
        TestIsValidUsernameTrue();
        TestIsValidUsernameFalse();
    }

    public void TestIsValidUsernameTrue()
    {
        foreach (char c in "abcdefghijklmnopqrstuvwxyz")
            Debug.Assert(UserCreationScreen.IsValidUsername(c.ToString()));

        Debug.Assert(UserCreationScreen.IsValidUsername("abcdefghijkl"));
    }

    public void TestIsValidUsernameFalse()
    {
        Debug.Assert(!UserCreationScreen.IsValidUsername(string.Empty));
        foreach (char c in " \n\t0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ+-*/%_(){}[]\\")
            Debug.Assert(!UserCreationScreen.IsValidUsername(c.ToString()));

        Debug.Assert(!UserCreationScreen.IsValidUsername("abcdefghijklmnopqrstuvwxyz"));
    }
}
