예제 #1
0
파일: TestKey.cs 프로젝트: rwth-acis/GaMR
    public void SetUp()
    {
        parent   = new GameObject();
        keyboard = parent.AddComponent <Keyboard>();
        parent.AddComponent <BoxCollider>();
        go = new GameObject();
        go.transform.parent = parent.transform;
        keyboard.inputField = go.AddComponent <TextMesh>();
        GameObject background = GameObject.CreatePrimitive(PrimitiveType.Cube);

        background.name             = "Background";
        background.transform.parent = parent.transform;
        key = go.AddComponent <Key>();
        parent.AddComponent <Keyboard>();
        captionObj = new GameObject("Caption");
        captionObj.transform.parent = go.transform;
        caption = captionObj.AddComponent <TextMesh>();
        InformationManager  infoManager = parent.AddComponent <InformationManager>();
        LocalizationManager manager     = parent.AddComponent <LocalizationManager>();

        keyboard.Awake();
        // due to localization 50 keys are expected but for simplicity this test case only provides one
        //LogAssert.Expect(LogType.Error, "Keyboard-layout file has the wrong number of keys: Should be 1 but is 50");
        key.Awake();
    }