using System; namespace ClassLibrary1 { public class Class1 { public String test = "1"; public Class1() { } public void Test() { test = "2"; } } }
using ClassLibrary1; using NUnit.Framework; namespace UnitTestProject1 { [TestFixture] public class UnitTest1 { [Test] public void TestMethod1() { Class1 classe = new Class1(); Assert.AreEqual(classe.test, "1"); classe.Test(); Assert.AreEqual(classe.test, "2"); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)