aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/Tests/VersionInfoTests.cs
blob: 6745bacefe79fe61f5bcd46f2f423bedc9be430f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;

namespace OpenSim.Framework.Servers.Tests
{
    [TestFixture]
    public class VersionInfoTests
    {
        [Test]
        public void TestVersionLength()
        {
            Assert.AreEqual(VersionInfo.VERSIONINFO_VERSION_LENGTH, VersionInfo.Version.Length," VersionInfo.Version string not " + VersionInfo.VERSIONINFO_VERSION_LENGTH + " chars." );
        }

        [Test]
        public void TestGetVersionStringLength()
        {
            foreach (VersionInfo.Flavour flavour in Enum.GetValues(typeof(VersionInfo.Flavour)))
            {
                Assert.AreEqual(VersionInfo.VERSIONINFO_VERSION_LENGTH, VersionInfo.GetVersionString("0.0.0", flavour).Length, "0.0.0/" + flavour + " failed");
            }
        }
    }
}