I'm trying to setup a test framework in Sharpdevelop (open source and leightweight alt. to Visual Studio), but there's this guide where the creator is using Visual Studio.
He first creates a new project, called WordpressAutomation and a Class Library with the following code in it:
He then creates another project, using the Unit test Project template in the solution and calls WordpressTests. It has the following code in it.
He basically references the wordpressautomation code in his wordpresstest project... it opens up Firefox. Easy.
Now Sharpdevelop doesn't have a "unit test" project template so I created an empty project instead, then a Unit Test class and went from there.
However, when trying to run it gives me the "CS5001 - does not contain a static 'Main' method suitable for an entry point" error.
How can I fix this?
Thanks!
He first creates a new project, called WordpressAutomation and a Class Library with the following code in it:
C#:
Using system;
using system.collections.generic;
using system.linq;
using system.text;
using system.threading.tasks;
using openqa.selenium.firefox; // used to control browser
namespace WordpressAutomation
{
public class Class1
{
public void Go()
{
var driver = new FirefoxDriver();
driver.Navigate().GoToUrl("http://www.google.com");
}
}
}
C#:
using system;
using microsoft.visualstudio.testtools.unittesting;
[I]using wordpressautomation;[/I]
namespace WordpressTests
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod()
{
var c = new Class1();
c.Go();
}
}
}
He basically references the wordpressautomation code in his wordpresstest project... it opens up Firefox. Easy.
Now Sharpdevelop doesn't have a "unit test" project template so I created an empty project instead, then a Unit Test class and went from there.
However, when trying to run it gives me the "CS5001 - does not contain a static 'Main' method suitable for an entry point" error.
How can I fix this?
Thanks!