|
using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using DataStructuresDotNet.DataStructures;
namespace DataStructuresDotNetTests
{
[TestFixture]
public class SingletonTest
{
[TestFixtureSetUp]
public void SetupSingleton()
{
Singleton<TestInstance>.Instance.val = 5;
}
[Test]
public void TestSuccesfulInit()
{
Assert.AreEqual(Singleton<TestInstance>.Instance.val, 5);
}
private class TestInstance
{
public int val;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
The author is a software consultant in South Africa, specializing in bespoke software solutions.