> Give me a week or some and I think I'll have something that you'll like...
> basically, you can register a function that's called when stuff is added to
> the function table... and there'll be a "why" associated with the adding.
> When you're running in test mode, you can intercept the functions
Hi,
> Scala supports true closures which means that variables in scope (including
> "this") are bound to the function.
>
> Lift associates the function passed to SHtml.text(defaultValue,
> passedFunction) with a GUID and returns places that GUID in the name
> attribute of the generated HTML eleme
That work> A hah! I had forgotten that I'd done this. Try the
following:
>
> myUser.runSafe {
> myUser.id(55L)
>
> }
>
Now it works and thanks for the explanation!!
br,
- Erik
> Mapper supports read and write access control on a field by field bases.
> You can put in complex logic (e.g.,
Hi,
> New users are moderated to avoid spam... on weekends, it may take up to a
> day for postings to appear on list.
Ok, sorry for the spam then ;)
> You should be able to do:
>
> myUserInstance.id(55L)
>
> That should set it to 55.
I try to do this in my unit test:
val u2 = User.create
u2.id
Hi,
I'm asking some questions again :) This time it is about form
handling. I tried to get the idea from source code but I think it
would be easier if some one wiser could open it a bit.
Here is my understanding, please correct me if it is incorrect:
1. I have snippet (TeamSnippet) with "add" f
Hi,
It may happen that this post appears twice to this forum - in that
case sorry for the double posting ;)
Anyhow, I have following case. For unit test case I would need to be
able to define what is the value the id field in ProtoUser returns. I
know that I could handle this by just creating a
Hi,
I would like to use ProtoUser in my unit test so that I could set it's
id's value. One way to do this is that I would create a mock object of
the ProtoUser and then define what the id returns. However, I would
rather like to use just the real class as it is. Is there a
possibility to give the
pe signature wrong on Lists of MappedField.
>
> On Tue, Apr 28, 2009 at 9:51 AM, erik.karls...@iki.fi <
>
>
>
> erik.b.karls...@gmail.com> wrote:
>
> > hello,
>
> > Tried to dig a bit more. I noticed that I get the cryptic compile
> > error with the m
kirjoitti:
>
> > Erik,
>
> > Please do an:
>
> > mvn clean test
>
> > From the command line.
>
> > The Eclipse plugin uses a different version of Scala than does Lift. There
> > will be weird errors like the one you've seen.
>
> > Thanks,
pse plugin uses a different version of Scala than does Lift. There
> will be weird errors like the one you've seen.
>
> Thanks,
>
> David
>
> On Mon, Apr 27, 2009 at 2:24 PM, erik.karls...@iki.fi <
> erik.b.karls...@gmail.com> wrote:
>
> >
> > Wei
m.user, user.id),
OrderBy(UserTeam.team, Ascending)).map(_.team.obj.open_!)
}
---
- Erik
On Apr 28, 12:19 am, "erik.karls...@iki.fi"
wrote:
> Hi,
>
> I have set of specs test and I'm using mockito
>
> I noticed that if I have a list of Users (pretty much same class that
Hi,
I have set of specs test and I'm using mockito
I noticed that if I have a list of Users (pretty much same class that
is coming from archetype) and do following test:
users(1).firstName must beEqualTo(name2)
Then I get :
[WARNING] Exception in thread "main" java.lang.RuntimeException:
malfo
d(0).text must beEqualTo("TeamName2")
}
}
}
The point is to create traits that wraps the model's functions and
then mock those interfaces. Basic stuff ;)
- Erik
>
> Derek
>
> On Sun, Apr 19, 2009 at 3:15 AM, erik.karls...@iki.fi <
>
> erik.b.karls...@gmail
up a Derby or HSQL DB for test
> > purposes in your Boot class work? Usually I use this method combined with
> > DBUnit to load test data.
>
> > Derek
>
> > On Fri, Apr 17, 2009 at 3:43 PM, erik.karls...@iki.fi <
> > erik.b.karls...@gmail.com> wrote:
>
> >
Hi,
I'm a little bit puzzled about the problem of mocking multiple models
in one class. My problem is following:
I have a snippet that uses two models. To be able to test the snippet
I would need to create Mock objects for both of those models and
especially for the object part of the model (to
> On Apr 4, 5:45 pm, "erik.karls...@iki.fi"
> wrote:
>
> > Hi,
>
> > First thanks for the great framework. It has been long time when I had
> > this fun with web programming :)
>
> > I have a pretty newbie question about unit testing. Do anybody know
&
those classes but
I would be really interested to hear comments about proper/recommended
way of handling for example sessions, request properties, states etc.
Thanks beforehand!
-Erik
--
Erik Karlsson
erik.karls...@iki.fi
--~--~-~--~~~---~--~~
You received this
17 matches
Mail list logo