Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit Test in sln C# solution failed : SecurityException #38775

Closed
evan-boissonnot opened this issue May 16, 2020 · 5 comments
Closed

Unit Test in sln C# solution failed : SecurityException #38775

evan-boissonnot opened this issue May 16, 2020 · 5 comments

Comments

@evan-boissonnot
Copy link

Godot version:
3.2.1 mono stable

OS/device including version:
windows 10 pro

Issue description:
Creating a unit test project in Visual studio solution.
Adding a unit test to my DialogBox.
Launching and getting this error :
ECall Methods Must Be Packaged Into A System Module

Steps to reproduce:
Creation a DialogBox Node with DIalogBox.cs

See this code below :
using Godot;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;

///


/// Dialog box : display content text and a texture animated sprite
///

public class DialogBox : Node2D
{
#region Fields
private List _messageList = new List();
private int _currentPartOfMessage = 0;
#endregion

#region Public methods
public override void _Ready()
{
    
}
#endregion

#region Internal methods
#endregion

#region Properties

/// <summary>
/// Content message to display
/// </summary>
public string Message
{
    get
    {
        string content = string.Empty;

        if (this.CurrentPartOfMessage < this.MessageList.Count)
        {
            content = this.MessageList[this.CurrentPartOfMessage];
        }

        return content;
    }
}

/// <summary>
/// Index of the part of the message in the message list
/// </summary>
public int CurrentPartOfMessage { get => this._currentPartOfMessage; private set => this._currentPartOfMessage = value; }

/// <summary>
/// List of message text as one full message to be displayed in X steps
/// </summary>
[Export]
public List<string> MessageList { get => this._messageList; set => this._messageList = value; }
#endregion

}

@van800
Copy link
Contributor

van800 commented May 23, 2020

@Calinou
Copy link
Member

Calinou commented May 24, 2020

Closing in favor of godotengine/godot-proposals#432, since this is more of a missing feature/documentation than a bug.

@evan-boissonnot
Copy link
Author

Ok, taht's right : if the next feature will drop this bug, I'm ok :)

@evan-boissonnot
Copy link
Author

Hug I retry unit tests, and really I'm not ok, it's not a missing doc, it's really a bug for me.
Why am I not able to create a unit test as usual ?

@van800
Copy link
Contributor

van800 commented Mar 23, 2021

Hey @evan-boissonnot, you may write me on discord van800#9412. I can explain you the difficulty with UnitTesting support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants