Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   SharpDevelop, NUnit (https://www.delphipraxis.net/141593-sharpdevelop-nunit.html)

hoika 12. Okt 2009 07:23


SharpDevelop, NUnit
 
Hallo #,

ich spiele gerade ein bisschen mit c# rum.
Was ich nicht hinbekomme, ist die Nutzung von NUnit.
Ich habe mit de 2.5.2 runtergeladen und installiert.
Jetzt müsste Sie doch im GAC sein, oder nicht ?

Bei using NUnit.Framework wird aber das NUnit
unterkringelt und als Fehlermeldung kommt

Der Typ- oder Namespacename NUnit konnte nicht gefunden werden. (Fehlt eine using-Direktive oder ein Assemblyverweis?) (CS0246)

Muss ich da noch irgendwas anderes machen ?
Kann es sein, dass NUnit gar nicht im GAC ist ?


Danke


Heiko

hoika 12. Okt 2009 07:33

Re: SharpDevelop, NUnit
 
Hallo, #

Update: bin etwas weiter
rechte Maustaste Referenz hinzufügen.
Im GAC ist die 2.2er NUnit.

Jetzt meckert er hier.

using NUnit.Framework.SyntaxHelpers;

Google sagte, alle Methoden aus SyntaxHelpers wurden
nach Framework verschoben.

Also auskommentiert.


Delphi-Quellcode:
namespace App_NUnit
{
   [TestFixture]
   public class Test1
   {
      [Test]
      public void TestMethod()
      {
         // TODO: Add your test.
         Assert(1+2, Is.EqualTo(4)); // Kringel
      }
   }
}
Fehlermeldung: NUnit.Framework.Assert ist ein Typ, wird jedoch als Variable verwendet. (CS0118) -


*Ratlos*


Heiko

hoika 12. Okt 2009 07:36

Re: SharpDevelop, NUnit
 
Hallo #,

wer lesen kann, ist klar im Vorteil

Delphi-Quellcode:
Assert.AreEqual(1+2, 4, "1+2   <> 4");

Heiko


Alle Zeitangaben in WEZ +1. Es ist jetzt 13:51 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz