ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rusty Wright <rusty.wri...@gmail.com>
Subject Re: internal constructor problem
Date Fri, 20 Jul 2007 18:54:29 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Verdana">I had a similar problem with unit tests; see the
reply from Tony Bjerstedt below.<br>
<br>
</font><br>
-------- Original Message --------
<table class="moz-email-headers-table" border="0" cellpadding="0"
 cellspacing="0">
  <tbody>
    <tr>
      <th align="right" nowrap="nowrap" valign="baseline">Subject: </th>
      <td>Re: [Nunit-users] name spaces?</td>
    </tr>
    <tr>
      <th align="right" nowrap="nowrap" valign="baseline">Date: </th>
      <td>Tue, 17 Jul 2007 18:41:24 -0700</td>
    </tr>
    <tr>
      <th align="right" nowrap="nowrap" valign="baseline">From: </th>
      <td>Charlie Poole <a class="moz-txt-link-rfc2396E" href="mailto:charlie@pooleconsulting.com">&lt;charlie@pooleconsulting.com&gt;</a></td>
    </tr>
    <tr>
      <th align="right" nowrap="nowrap" valign="baseline">To: </th>
      <td><a class="moz-txt-link-rfc2396E" href="mailto:nunit-users@lists.sourceforge.net">&lt;nunit-users@lists.sourceforge.net&gt;</a></td>
    </tr>
  </tbody>
</table>
<br>
<br>
<pre>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

&gt; -----Original Message-----
&gt; From: <a class="moz-txt-link-abbreviated" href="mailto:nunit-users-bounces@lists.sourceforge.net">nunit-users-bounces@lists.sourceforge.net</a>

&gt; [<a class="moz-txt-link-freetext" href="mailto:nunit-users-bounces@lists.sourceforge.net">mailto:nunit-users-bounces@lists.sourceforge.net</a>]
On Behalf 
&gt; Of Rusty Wright
&gt; Sent: Tuesday, July 17, 2007 11:20 AM
&gt; To: <a class="moz-txt-link-abbreviated" href="mailto:Tony.Bjerstedt@audatex.com">Tony.Bjerstedt@audatex.com</a>
&gt; Cc: <a class="moz-txt-link-abbreviated" href="mailto:nunit-users@lists.sourceforge.net">nunit-users@lists.sourceforge.net</a>
&gt; Subject: Re: [Nunit-users] name spaces?
&gt; 
&gt; Great, sounds like just what I need.  Thanks.
&gt; 
&gt; <a class="moz-txt-link-abbreviated" href="mailto:Tony.Bjerstedt@audatex.com">Tony.Bjerstedt@audatex.com</a>
wrote:
&gt; &gt; If your tests are in a different assembly, they no longer 
&gt; can see any 
&gt; &gt; of the classes that they test. Internal scope only allows other 
&gt; &gt; classes in the same assembly to have access to the internal scoped 
&gt; &gt; classes and members. You can extend internal visibility to other 
&gt; &gt; assemblies using the "InternalsVisibleTo" attribute.
&gt; &gt;
&gt; &gt; Add a statement like:
&gt; &gt; 	[assembly: InternalsVisibleTo("My.Test.Assembly")]
&gt; &gt; To you "assemblyinfo.cs" file.
&gt; &gt;
&gt; &gt;
&gt; &gt; -----Original Message-----
&gt; &gt; From: <a class="moz-txt-link-abbreviated" href="mailto:nunit-users-bounces@lists.sourceforge.net">nunit-users-bounces@lists.sourceforge.net</a>
&gt; &gt; [<a class="moz-txt-link-freetext" href="mailto:nunit-users-bounces@lists.sourceforge.net">mailto:nunit-users-bounces@lists.sourceforge.net</a>]
On 
&gt; Behalf Of Rusty 
&gt; &gt; Wright
&gt; &gt; Sent: Tuesday, July 17, 2007 12:29 PM
&gt; &gt; To: <a class="moz-txt-link-abbreviated" href="mailto:nunit-users@lists.sourceforge.net">nunit-users@lists.sourceforge.net</a>
&gt; &gt; Subject: [Nunit-users] name spaces?
&gt; &gt;
&gt; &gt; How do people manage their name spaces with NUnit?  I have 
&gt; a class in 
&gt; &gt; the namespace ShopsiteOrderApi that I'm testing and my unit 
&gt; tests are 
&gt; &gt; in
&gt; &gt;
&gt; &gt; the namespace Tests.  I tried changing the class in the 
&gt; &gt; ShopsiteOrderApi
&gt; &gt;
&gt; &gt; from public to internal but now the test won't compile.
&gt; &gt;
&gt; &gt; 
&gt; ----------------------------------------------------------------------
&gt; &gt; --
&gt; &gt; -
&gt; &gt; This SF.net email is sponsored by DB2 Express Download DB2 
&gt; Express C - 
&gt; &gt; the FREE version of DB2 express and take control of your XML. No 
&gt; &gt; limits. Just data. Click to get it now.
&gt; &gt; <a class="moz-txt-link-freetext" href="http://sourceforge.net/powerbar/db2/">http://sourceforge.net/powerbar/db2/</a>
&gt; &gt; _______________________________________________
&gt; &gt; Nunit-users mailing list
&gt; &gt; <a class="moz-txt-link-abbreviated" href="mailto:Nunit-users@lists.sourceforge.net">Nunit-users@lists.sourceforge.net</a>
&gt; &gt; <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nunit-users">https://lists.sourceforge.net/lists/listinfo/nunit-users</a>
&gt; &gt;   
&gt; 
&gt; --------------------------------------------------------------
&gt; -----------
&gt; This SF.net email is sponsored by DB2 Express Download DB2 
&gt; Express C - the FREE version of DB2 express and take control 
&gt; of your XML. No limits. Just data. Click to get it now.
&gt; <a class="moz-txt-link-freetext" href="http://sourceforge.net/powerbar/db2/">http://sourceforge.net/powerbar/db2/</a>
&gt; _______________________________________________
&gt; Nunit-users mailing list
&gt; <a class="moz-txt-link-abbreviated" href="mailto:Nunit-users@lists.sourceforge.net">Nunit-users@lists.sourceforge.net</a>
&gt; <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nunit-users">https://lists.sourceforge.net/lists/listinfo/nunit-users</a>
&gt; 



-------------------------------------------------------------------------
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.
<a class="moz-txt-link-freetext" href="http://sourceforge.net/powerbar/db2/">http://sourceforge.net/powerbar/db2/</a>
_______________________________________________
Nunit-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nunit-users@lists.sourceforge.net">Nunit-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nunit-users">https://lists.sourceforge.net/lists/listinfo/nunit-users</a>

</pre>
</body>
</html>

Mime
View raw message