Пример #1
0
    public void TestFormat()
    {
        var generator = new WindowsTrashCanNodeNameGenerator();
        var name      = generator.Generate();

        Assert.NotNull(name);
        Assert.Equal(6, name.Length);
        Assert.Equal(name.ToUpper(), name);
    }
Пример #2
0
    public void TestRandom()
    {
        var generator = new WindowsTrashCanNodeNameGenerator();
        var names     = new HashSet <string>();

        for (var i = 0; i < 1000; i++)
        {
            var name = generator.Generate();
            Assert.DoesNotContain(name, names);

            names.Add(name);
        }
    }