I had a similar problem with unit tests; see the
reply from Tony Bjerstedt below.
-------- Original Message --------
Hi Rusty,
Tony's advice is good, assuming you are using Visual Studio 2005.
Note that it's only the use of a separate assembly, not a different
namespace that is causing the problem. You can have different namespaces
in a single assembly or one namespace across multiple assemblies.
You handle assembly visibility with references. Namespace visibility
with using (VB=imports) statements.
Charlie
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On Behalf
> Of Rusty Wright
> Sent: Tuesday, July 17, 2007 11:20 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: [Nunit-users] name spaces?
>
> Great, sounds like just what I need. Thanks.
>
> [EMAIL PROTECTED] wrote:
> > If your tests are in a different assembly, they no longer
> can see any
> > of the classes that they test. Internal scope only allows other
> > classes in the same assembly to have access to the internal scoped
> > classes and members. You can extend internal visibility to other
> > assemblies using the "InternalsVisibleTo" attribute.
> >
> > Add a statement like:
> > [assembly: InternalsVisibleTo("My.Test.Assembly")]
> > To you "assemblyinfo.cs" file.
> >
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]] On
> Behalf Of Rusty
> > Wright
> > Sent: Tuesday, July 17, 2007 12:29 PM
> > To: [EMAIL PROTECTED]
> > Subject: [Nunit-users] name spaces?
> >
> > How do people manage their name spaces with NUnit? I have
> a class in
> > the namespace ShopsiteOrderApi that I'm testing and my unit
> tests are
> > in
> >
> > the namespace Tests. I tried changing the class in the
> > ShopsiteOrderApi
> >
> > from public to internal but now the test won't compile.
> >
> >
> ----------------------------------------------------------------------
> > --
> > -
> > This SF.net email is sponsored by DB2 Express Download DB2
> Express C -
> > the FREE version of DB2 express and take control of your XML. No
> > limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Nunit-users mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/nunit-users
> >
>
> --------------------------------------------------------------
> -----------
> This SF.net email is sponsored by DB2 Express Download DB2
> Express C - the FREE version of DB2 express and take control
> of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Nunit-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nunit-users
>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Nunit-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nunit-users
|