I am integrating an external library that declares a singleton, like this:
public class External : MonoBehaviour {
public static External Instance { get {/*setup inner stuff*/} }
public void Method1(int arg);
...
public bool MethodN(): // N is large
}
I created a wrapper with an interface, so I can unit-test the rest of my code.
I am wondering if there is an easy way to test/validate that my wrapper is correctly wired, i.e. every method calls the wrapped method, forwarding the parameters and returning the result (if non-void). e.g.:
public class ApiWrapper : IExernalAPI {
public void Method1(int arg) {
External.Instance.Method1(arg);
}
...
public bool MethodN() {
return External.Instance.MethodN();
}
}
should this class be "unit"-tested? if so, how?