Exemplo n.º 1
0
        public void CreateShortName_02()
        {
            // Arrange
            var name  = "aaa";
            var names = new List <string> {
                "aaa", "aab"
            };

            // Act
            var shortName = ShortNameUtilities.CreateShortName(names, 3, name);

            // Assert
            Assert.AreEqual("aa0", shortName);
        }
Exemplo n.º 2
0
        public void BuildShortNames_01()
        {
            // Arrange
            var names = new List <string> {
                "aaaa", "aaab", "aaa", "aab", "other"
            };

            // Act
            var shortNames = ShortNameUtilities.BuildShortNames(names, 3);

            // Assert
            Assert.AreEqual("aa0", shortNames["aaaa"]);
            Assert.AreEqual("aa1", shortNames["aaab"]);
            Assert.AreEqual("aaa", shortNames["aaa"]);
            Assert.AreEqual("aab", shortNames["aab"]);
            Assert.AreEqual("oth", shortNames["other"]);
        }