Hey I am completely new here,
I am trying to play around with silver on windows a little. But I have no idea how to setup EUnit, if I just make class in the WPF application, it does not know RemObjects.Elements.EUnit namespace, and if I make the whole EUnit project, it does not know withListener. Did I screwed up setup somewhere on the way?
the idea would-be that you create two projects — your real app, and a test project (which references EUnit.dll which in turn gives you the RemObjects.Elements.EUnit namespace). You then share the code you want to test between the two projects — either reference your main project from the test project, or just add the same code files to both.
Hey,
so I have RemObjects.Elements.EUnit in the list of references in my test project, but I am still getting Unknow identifier on withListener here
Runner.RunTests(lTests) withListener(ConsoleTestListener())`
I notice that is indeed broken in our template. fixing now. You will also need to manually set Copy Local on the Swift, Sugar and EUnit references to True, that’s another template bug i just fixed. My apologies for that.
And one more question,
so I wrote first test, I run it, console pops up and its gone in a split second. How can I see the results? Is there a way to see classic red/green bar?
You can add a Console.ReadLine() or something along those lines the the Program.swift file, to keep the console window open after it finishes running. Unfortunately Windows closes console windows immediately after the process exits
Right now, EUnit only has the console-mode viewer, no GUI viewer yet — although that is on the list.
thanks, that did the trick, I was just not sure where to put the Console.Realine()
and now I just need to figure out which Discovery method to use, because right now I am getting 0 tests even that there should be 1, so Discovery is not discovering. I can not find any examples on this .
Hi,
so I got it working, my problem was at first that template generated something like this
public class TestCalculator{...}
and it took me a while to find the example that said that I need to extend class Test, also I got confused because I was trying to fit it to this syntax http://docs.elementscompiler.com/API/EUnit/Test_Class/ first but now it is working, although it is for some reason finding one test more that I am not aware of.