The easiest way for me to see the specific changes you made and
integrate them into my tree to run them would be if you sent me a
patch file.
If you're using the command line tool, from the root folder you
checked out to, enter this:
svn diff > my.patch
And then email me that my.patch file.
If you're using Tortoise SVN:
Right-click the folder, select Tortoise SVN, then select Create
Patch.... Select the files you changed, save the file, and email it.
--
Jason
I just checked in the automatic formatting of methods like we talked
about. AddingAAndB(1, 2) now gets reported as "adding 1 and 2" if the
parameter names are a and b. I haven't done the Format attribute yet,
though.
Also, Scenario has a bunch of Add overloads for delegates now. Your
methods need to start with given/when/then or Add throws an exception.
Also, I used your code as an example and stripped away given/when/then
from method names and output the first convertible object found in the
arguments. Some more thought has to get put into how we can pass in
"real" objects and have them get reported, though.
It should be a lot closer to what you're hoping. Let me know if it
meets your needs. I want to make another release soon with all the new
goodies. =)
--
Jason
Hi.
I just checked in the automatic formatting of methods like we talked
about. AddingAAndB(1, 2) now gets reported as "adding 1 and 2" if the
parameter names are a and b. I haven't done the Format attribute yet,
though.
Also, Scenario has a bunch of Add overloads for delegates now. Your
methods need to start with given/when/then or Add throws an exception.
Also, I used your code as an example and stripped away given/when/then
from method names and output the first convertible object found in the
arguments. Some more thought has to get put into how we can pass in
"real" objects and have them get reported, though.
It should be a lot closer to what you're hoping. Let me know if it
meets your needs. I want to make another release soon with all the new
goodies. =)
On Mon, Aug 17, 2009 at 8:45 AM, cliff vaughn<clifton...@gmail.com> wrote:
> I found and issue with the previous request to modify the stack trace. I
> think you may be also removing lines that are from the client code.
> Usually, the last couple of lines are the test method that started the whole
> thing. I haven't looked at the code to see how you're stripping off your
> stiff, but it might need some tweaking.
If you have an example, that would be cool. I'm using a regular
expression to only strip out lines that have the names of certain
BehaveN classes in them so I'd be surprised if I lost some real client
code. (Unless you're testing BehaveN...)
> Also, i've been playing around with anonymous delegates. See what you can
> do with this:
That looks cool, but I'd have to think about it some more to try to
imagine if it would be worth it and implementable.
> I think the way to handle this is to make the Form class smart enough, that
> when given an object, it just uses reflection to pull out all public,
> readable properties. It could be made smart enough to travel down the
> hierarchy and output child objects too. Of course this would/should be
> configurable in case a person's not interested in the rest of the
> hierarchy. You should either be able to construct the Form with the object
> or Add the object to the form with some id.
I was thinking about something like this, too, but then I noticed how
must of the forms and grids we have in our existing tests only display
subsets of the data from the real domain objects they're representing.
If it displayed too much, it would add too much noise to the report.
> Finally, i noticed that scenarios can have names i think with context. Any
> reason you don't output the name of the test method with the GWT stuff?
Maybe you're thinking of the Name method. That's used to name the
scenario. In the plain text syntax, you use a line like this to name
it:
Scenario: My Scenario
I've been thinking about adding a way to infer the scenario name from
the test method name. I might have to use the API that lets you
examine the stack to figure that out. I think it can be done, I just
haven't gotten to it yet.
Thanks.
--
Jason
If you have an example, that would be cool. I'm using a regular
expression to only strip out lines that have the names of certain
BehaveN classes in them so I'd be surprised if I lost some real client
code. (Unless you're testing BehaveN...)
That looks cool, but I'd have to think about it some more to try to
> Also, i've been playing around with anonymous delegates. See what you can
> do with this:
imagine if it would be worth it and implementable.
I was thinking about something like this, too, but then I noticed how
> I think the way to handle this is to make the Form class smart enough, that
> when given an object, it just uses reflection to pull out all public,
> readable properties. It could be made smart enough to travel down the
> hierarchy and output child objects too. Of course this would/should be
> configurable in case a person's not interested in the rest of the
> hierarchy. You should either be able to construct the Form with the object
> or Add the object to the form with some id.
must of the forms and grids we have in our existing tests only display
subsets of the data from the real domain objects they're representing.
If it displayed too much, it would add too much noise to the report.
Maybe you're thinking of the Name method. That's used to name the
> Finally, i noticed that scenarios can have names i think with context. Any
> reason you don't output the name of the test method with the GWT stuff?
scenario. In the plain text syntax, you use a line like this to name
it:
Scenario: My Scenario
I've been thinking about adding a way to infer the scenario name from
the test method name. I might have to use the API that lets you
examine the stack to figure that out. I think it can be done, I just
haven't gotten to it yet.
Thanks.