Esempio n. 1
0
    public void LoadFileZCheck()
    {
        Motion3DProblemIOManager sim = new Motion3DProblemIOManager();

        sim.Load("rosslerAttractor.3dmotion");
        Assert.AreEqual("B+x*z-C*z", sim.expressionZ);
    }
Esempio n. 2
0
    public void LoadFileXCheck()
    {
        Motion3DProblemIOManager sim = new Motion3DProblemIOManager();

        sim.Load("rosslerAttractor.3dmotion");
        Assert.AreEqual("-(y+z)", sim.expressionX);
    }
Esempio n. 3
0
    public void LoadFileDescCheck()
    {
        Motion3DProblemIOManager sim = new Motion3DProblemIOManager();

        sim.Load("rosslerAttractor.3dmotion");
        Assert.AreEqual("The Rossler strange attractor", sim.description);
    }
Esempio n. 4
0
    public void LoadFileNameCheck()
    {
        Motion3DProblemIOManager sim = new Motion3DProblemIOManager();

        sim.Load("rosslerAttractor.3dmotion");
        Assert.AreEqual("Rossler Attractor", sim.name);
    }
Esempio n. 5
0
        public void FileManager_LoadButtonPress()
        {
            Motion3DFileManager      fileManager = fileManagerView.GetComponent <Motion3DFileManager>();
            Motion3DProblemIOManager input       = new Motion3DProblemIOManager();

            //Load the data
            input.Load(fileManager.selectedFilename);
            //Apply the new problem configuration
            input.Apply(simController);
            //Close the file manager menu
            fileManagerView.SetActive(false);
        }
Esempio n. 6
0
    public void ConstructorWithParse1stOrder_CheckX()
    {
        Motion3DProblemIOManager sim = new Motion3DProblemIOManager();

        sim.Load("rosslerAttractor.3dmotion");

        Motion3DSetup ms =
            new Motion3DSetup(
                sim.expressionX, sim.expressionY, sim.expressionZ,
                sim.parameters, sim.order
                );

        Assert.AreEqual(ms.ExpressionX, "-(y+z)");
    }
Esempio n. 7
0
    public void ChangeParameterX()
    {
        Motion3DProblemIOManager sim = new Motion3DProblemIOManager();

        sim.Load("rosslerAttractor.3dmotion");

        Motion3DSetup ms =
            new Motion3DSetup(
                sim.expressionX, sim.expressionY, sim.expressionZ,
                sim.parameters, sim.order
                );

        ms.ChangeParameter("expressionX", 3);
        Assert.AreNotEqual(ms.ExpressionX, 3);
    }
Esempio n. 8
0
    public void ConstructorWithParse1stOrder()
    {
        try {
            Motion3DProblemIOManager sim = new Motion3DProblemIOManager();
            sim.Load("rosslerAttractor.3dmotion");

            Motion3DSetup ms =
                new Motion3DSetup(
                    sim.expressionX, sim.expressionY, sim.expressionZ,
                    sim.parameters, sim.order
                    );
        }
        catch (Exception e) {
            Debug.LogAssertion(e);
            Assert.IsTrue(false);
        }
    }