I tired to write Unit-Tests for a Unity3D project. There is this big issue with MonoBehaviours, making it quite hard. To solve that issue I used this tutorial to make a object construct called Humble Object.
In the tutorial has been this code (I simplified it):
public class Something : ISomething
{
#region ISomething implementation
void Test1() {
// do something
}
#endregion
void Test2() {
Test1 ();
}
}
As I get it, that should be equivalent to:
interface ISomething
{
void Test1();
}
public class Something : ISomething
{
public void Test1() {
// do something
}
void Test2() {
Test1 ();
}
}
But if i write that first code and try to compile, I get this error message: (the second one does the job)
[...] The type or namespace name `ISomething' could not be found. Are you missing a using directive or an assembly reference?