public void AddFileNamesTest()
        {
            using (var tempDirectory = new TempDirectory(true))
            {
                tempDirectory.AddDirectory("A");

                var manager = new ResultImageManager2(tempDirectory.Name);
                manager.AddFileNames(new []
                {
                    tempDirectory.FullPath(@"A\file0.png"),
                    tempDirectory.FullPath(@"A\file1.png"),
            //					tempDirectory.FullPath(@"file2.png"),
                });

                CollectionAssert.AreEquivalent(new []
                {
                    tempDirectory.FullPath(@"A\file0.png"),
                    tempDirectory.FullPath(@"A\file1.png"),
            //					tempDirectory.FullPath(@"file2.png"),
                }, manager.Files);

            //				Assert.AreEqual(tempDirectory.FullPath(@"file2.png"), manager.GetFile("B"));
                Assert.Null(manager.GetFile("B"));
                Assert.AreEqual(tempDirectory.FullPath(@"A\file0.png"), manager.GetFile("A"));
                Assert.AreEqual(tempDirectory.FullPath(@"A\file1.png"), manager.GetFile("A"));
            }
        }
        public void 新しいグレード指定フォーマット()
        {
            using (var tempDirectory = new TempDirectory(true))
            {
                {
                    var manager = new ResultImageManager2();
                    manager.DirectoryName = tempDirectory.Name;

                    tempDirectory.AddFile(@"A\file0.png", "");
                    tempDirectory.AddFile(@"x[A]x[B]x\file0.bmp", "");
                    tempDirectory.AddFile(@"x[AB]x\file2.bmp", "");

                    CollectionAssert.AreEquivalent(new []
                    {
                        tempDirectory.GetFullPath(@"A\file0.png"),
                        tempDirectory.GetFullPath(@"x[A]x[B]x\file0.bmp"),
                        tempDirectory.GetFullPath(@"A\file0.png"),
                        tempDirectory.GetFullPath(@"x[A]x[B]x\file0.bmp"),

                    }, new []
                    {
                        manager.GetFile("A"),
                        manager.GetFile("A"),
                        manager.GetFile("A"),
                        manager.GetFile("A"),
                    });

                    CollectionAssert.AreEquivalent(new []
                    {
                        tempDirectory.GetFullPath(@"x[A]x[B]x\file0.bmp"),
                        tempDirectory.GetFullPath(@"x[A]x[B]x\file0.bmp"),

                    }, new []
                    {
                        manager.GetFile("B"),
                        manager.GetFile("B"),
                    });
                }
            }
        }
        public void 正しい挙動()
        {
            using (var tempDirectory = new TempDirectory(true))
            {
                tempDirectory.AddFile(@"A\file0.png", "");
                tempDirectory.AddFile(@"A\file1.png", "");
                tempDirectory.AddFile(@"A\file2.png", "");
                tempDirectory.AddFile(@"B,C,D\file3.png", "");
                tempDirectory.AddFile(@"B,C,D\file4.png", "");
                tempDirectory.AddFile(@"B,C,D\file5.png", "");
                tempDirectory.AddFile(@"C,D\file6.png", "");
                tempDirectory.AddFile(@"C,D\file7.png", "");
                tempDirectory.AddFile(@"C,D\file8.png", "");

                {
                    var manager = new ResultImageManager2(tempDirectory.Name);
                    CollectionAssert.AreEquivalent(new []
                    {
                        tempDirectory.GetFullPath(@"A\file0.png"),
                        tempDirectory.GetFullPath(@"A\file1.png"),
                        tempDirectory.GetFullPath(@"A\file2.png"),
                        tempDirectory.GetFullPath(@"A\file0.png"),
                        tempDirectory.GetFullPath(@"A\file1.png"),
                        tempDirectory.GetFullPath(@"A\file2.png"),

                    }, new []
                    {
                        manager.GetFile("A"),
                        manager.GetFile("A"),
                        manager.GetFile("A"),
                        manager.GetFile("A"),
                        manager.GetFile("A"),
                        manager.GetFile("A"),
                    });
                }
                {
                    var manager = new ResultImageManager2(tempDirectory.Name);
                    CollectionAssert.AreEquivalent(new []
                    {
                        tempDirectory.GetFullPath(@"B,C,D\file3.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file4.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file5.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file3.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file4.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file5.png"),
                    }, new []
                    {
                        manager.GetFile("B"),
                        manager.GetFile("B"),
                        manager.GetFile("B"),
                        manager.GetFile("B"),
                        manager.GetFile("B"),
                        manager.GetFile("B"),
                    });
                }
                {
                    var manager = new ResultImageManager2(tempDirectory.Name);
                    CollectionAssert.AreEquivalent(new []
                    {
                        tempDirectory.GetFullPath(@"B,C,D\file3.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file4.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file5.png"),
                        tempDirectory.GetFullPath(@"C,D\file6.png"),
                        tempDirectory.GetFullPath(@"C,D\file7.png"),
                        tempDirectory.GetFullPath(@"C,D\file8.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file3.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file4.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file5.png"),
                        tempDirectory.GetFullPath(@"C,D\file6.png"),
                        tempDirectory.GetFullPath(@"C,D\file7.png"),
                        tempDirectory.GetFullPath(@"C,D\file8.png"),
                    }, new []
                    {
                        manager.GetFile("C"),
                        manager.GetFile("C"),
                        manager.GetFile("C"),
                        manager.GetFile("C"),
                        manager.GetFile("C"),
                        manager.GetFile("C"),
                        manager.GetFile("C"),
                        manager.GetFile("C"),
                        manager.GetFile("C"),
                        manager.GetFile("C"),
                        manager.GetFile("C"),
                        manager.GetFile("C"),
                    });
                }
                {
                    var manager = new ResultImageManager2(tempDirectory.Name);
                    CollectionAssert.AreEquivalent(new []
                    {
                        tempDirectory.GetFullPath(@"B,C,D\file3.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file4.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file5.png"),
                        tempDirectory.GetFullPath(@"C,D\file6.png"),
                        tempDirectory.GetFullPath(@"C,D\file7.png"),
                        tempDirectory.GetFullPath(@"C,D\file8.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file3.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file4.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file5.png"),
                        tempDirectory.GetFullPath(@"C,D\file6.png"),
                        tempDirectory.GetFullPath(@"C,D\file7.png"),
                        tempDirectory.GetFullPath(@"C,D\file8.png"),
                    }, new []
                    {
                        manager.GetFile("D"),
                        manager.GetFile("D"),
                        manager.GetFile("D"),
                        manager.GetFile("D"),
                        manager.GetFile("D"),
                        manager.GetFile("D"),
                        manager.GetFile("D"),
                        manager.GetFile("D"),
                        manager.GetFile("D"),
                        manager.GetFile("D"),
                        manager.GetFile("D"),
                        manager.GetFile("D"),
                    });
                }
                {
                    var manager = new ResultImageManager2(tempDirectory.Name);
                    CollectionAssert.AreEquivalent(new []
                    {
                        tempDirectory.GetFullPath(@"B,C,D\file3.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file4.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file5.png"),
                        tempDirectory.GetFullPath(@"C,D\file6.png"),
                        tempDirectory.GetFullPath(@"C,D\file7.png"),
                        tempDirectory.GetFullPath(@"C,D\file8.png"),
                    }, new []
                    {
                        manager.GetFile("B"),
                        manager.GetFile("B"),
                        manager.GetFile("C"),
                        manager.GetFile("C"),
                        manager.GetFile("D"),
                        manager.GetFile("D"),
                    });
                }
                {
                    var manager = new ResultImageManager2(tempDirectory.Name);
                    CollectionAssert.AreEquivalent(new []
                    {
                        tempDirectory.GetFullPath(@"B,C,D\file3.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file4.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file5.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file3.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file4.png"),
                        tempDirectory.GetFullPath(@"B,C,D\file5.png"),
                        tempDirectory.GetFullPath(@"C,D\file6.png"),
                        tempDirectory.GetFullPath(@"C,D\file7.png"),
                        tempDirectory.GetFullPath(@"C,D\file8.png"),
                    }, new []
                    {
                        manager.GetFile("B"),
                        manager.GetFile("B"),
                        manager.GetFile("B"),
                        manager.GetFile("B"),
                        manager.GetFile("C"),
                        manager.GetFile("C"),
                        manager.GetFile("D"),
                        manager.GetFile("D"),
                        manager.GetFile("D"),
                    });
                }
            }
        }
        public void Test1()
        {
            using (var tempDirectory = new TempDirectory(true))
            {
                {
                    var manager = new ResultImageManager2();
                    manager.DirectoryName = tempDirectory.Name;

                    tempDirectory.AddFile(@"A\file0.png", "");
                    tempDirectory.AddFile(@"B\file0.bmp", "");
                    tempDirectory.AddFile(@"D\file0.txt", "");
                    manager.PrepareForImages();
                    CollectionAssert.AreEquivalent(new []
                    {
                        tempDirectory.GetFullPath(@"A\file0.png"),
                        tempDirectory.GetFullPath(@"B\file0.bmp"),

                    }, manager.Files);

                    Assert.AreEqual(tempDirectory.GetFullPath(@"A\file0.png"), manager.GetFile("A"));
                    CollectionAssert.AreEquivalent(new []
                    {
                        tempDirectory.GetFullPath(@"B\file0.bmp"),

                    }, manager.Files);

                    Assert.AreEqual(tempDirectory.GetFullPath(@"A\file0.png"), manager.GetFile("A"));
                    Assert.AreEqual(tempDirectory.GetFullPath(@"A\file0.png"), manager.GetFile("A"));
                    Assert.AreEqual(tempDirectory.GetFullPath(@"B\file0.bmp"), manager.GetFile("B"));
                    Assert.AreEqual(tempDirectory.GetFullPath(@"B\file0.bmp"), manager.GetFile("B"));
                    Assert.AreEqual(tempDirectory.GetFullPath(@"B\file0.bmp"), manager.GetFile("B"));

                    Assert.Null(manager.GetFile("C"));
                    Assert.Null(manager.GetFile("C"));
                    Assert.Null(manager.GetFile("C"));
                    Assert.Null(manager.GetFile("D"));
                    Assert.Null(manager.GetFile("D"));
                    Assert.Null(manager.GetFile("D"));

                    tempDirectory.AddFile(@"file3.jpg", "");
            /*					Assert.AreEqual(tempDirectory.GetFullPath(@"file3.jpg"), manager.GetFile("C"));
                    Assert.AreEqual(tempDirectory.GetFullPath(@"file3.jpg"), manager.GetFile("C"));
                    Assert.AreEqual(tempDirectory.GetFullPath(@"file3.jpg"), manager.GetFile("C"));
                    Assert.AreEqual(tempDirectory.GetFullPath(@"file3.jpg"), manager.GetFile("D"));
                    Assert.AreEqual(tempDirectory.GetFullPath(@"file3.jpg"), manager.GetFile("D"));
                    Assert.AreEqual(tempDirectory.GetFullPath(@"file3.jpg"), manager.GetFile("D"));
                    */
                    Assert.Null(manager.GetFile("C"));
                    Assert.Null(manager.GetFile("C"));
                    Assert.Null(manager.GetFile("C"));
                    Assert.Null(manager.GetFile("C"));
                    Assert.Null(manager.GetFile("C"));
                    Assert.Null(manager.GetFile("D"));
                    Assert.Null(manager.GetFile("D"));
                }
                {
                    var manager = new ResultImageManager2();
                    manager.DirectoryName = tempDirectory.Name;

                    tempDirectory.AddFile(@"A\file1.png", "");
                    CollectionAssert.AreEquivalent(new []
                    {
                        tempDirectory.GetFullPath(@"A\file0.png"),
                        tempDirectory.GetFullPath(@"A\file0.png"),
                        tempDirectory.GetFullPath(@"A\file1.png"),
                        tempDirectory.GetFullPath(@"A\file1.png"),

                    }, new []
                    {
                        manager.GetFile("A"),
                        manager.GetFile("A"),
                        manager.GetFile("A"),
                        manager.GetFile("A"),
                    });
                }
            }
        }