public void AddingMoreThanMaximumNumberOfAssemblysPushesOldestAssemblyOffTheList()
    {
        RecentlyUsedAssemblyList mruList = new RecentlyUsedAssemblyList(1);

        mruList.Add(@"C:\Foo\Bar.dll", null);
        mruList.Add(@"C:\Baz\Biff.dll", null);

        RecentlyUsedAssembly firstAssembly = Assert.Single(mruList);
        Assert.Equal(@"C:\Baz\Biff.dll", firstAssembly.AssemblyFilename);
    }
    public void NewAssemblysAreAddedToTheTopOfList()
    {
        RecentlyUsedAssemblyList mruList = new RecentlyUsedAssemblyList();

        mruList.Add(@"C:\Foo\Bar.dll", null);
        mruList.Add(@"C:\Baz\Biff.dll", null);

        RecentlyUsedAssembly firstAssembly = mruList.First();
        Assert.Equal(@"C:\Baz\Biff.dll", firstAssembly.AssemblyFilename);
    }
    public void AddedAssemblyIsInList()
    {
        RecentlyUsedAssemblyList mruList = new RecentlyUsedAssemblyList();

        mruList.Add(@"C:\Foo\Bar.dll", @"C:\Foo\Bar.dll.config");

        RecentlyUsedAssembly firstAssembly = Assert.Single(mruList);
        Assert.Equal(@"C:\Foo\Bar.dll", firstAssembly.AssemblyFilename);
        Assert.Equal(@"C:\Foo\Bar.dll.config", firstAssembly.ConfigFilename);
    }
    public void AddingMoreThanMaximumNumberOfAssemblysPushesOldestAssemblyOffTheList()
    {
        RecentlyUsedAssemblyList mruList = new RecentlyUsedAssemblyList(1);

        mruList.Add(@"C:\Foo\Bar.dll", null);
        mruList.Add(@"C:\Baz\Biff.dll", null);

        RecentlyUsedAssembly firstAssembly = Assert.Single(mruList);

        Assert.Equal(@"C:\Baz\Biff.dll", firstAssembly.AssemblyFilename);
    }
    public void NewAssemblysAreAddedToTheTopOfList()
    {
        RecentlyUsedAssemblyList mruList = new RecentlyUsedAssemblyList();

        mruList.Add(@"C:\Foo\Bar.dll", null);
        mruList.Add(@"C:\Baz\Biff.dll", null);

        RecentlyUsedAssembly firstAssembly = mruList.First();

        Assert.Equal(@"C:\Baz\Biff.dll", firstAssembly.AssemblyFilename);
    }
    public void AddedAssemblyIsInList()
    {
        RecentlyUsedAssemblyList mruList = new RecentlyUsedAssemblyList();

        mruList.Add(@"C:\Foo\Bar.dll", @"C:\Foo\Bar.dll.config");

        RecentlyUsedAssembly firstAssembly = Assert.Single(mruList);

        Assert.Equal(@"C:\Foo\Bar.dll", firstAssembly.AssemblyFilename);
        Assert.Equal(@"C:\Foo\Bar.dll.config", firstAssembly.ConfigFilename);
    }
    public void ReAddingAlreadyPresentAssemblyReordersAssemblyToTopOfList()
    {
        RecentlyUsedAssemblyList mruList = new RecentlyUsedAssemblyList();

        mruList.Add(@"C:\Foo\Bar.dll", null);
        mruList.Add(@"C:\Baz\Biff.dll", null);
        mruList.Add(@"C:\Foo\Bar.dll", null);

        RecentlyUsedAssembly firstAssembly = mruList.First();
        Assert.Equal(2, mruList.Count());
        Assert.Equal(@"C:\Foo\Bar.dll", firstAssembly.AssemblyFilename);
    }
    public void ReAddingAlreadyPresentAssemblyReordersAssemblyToTopOfList()
    {
        RecentlyUsedAssemblyList mruList = new RecentlyUsedAssemblyList();

        mruList.Add(@"C:\Foo\Bar.dll", null);
        mruList.Add(@"C:\Baz\Biff.dll", null);
        mruList.Add(@"C:\Foo\Bar.dll", null);

        RecentlyUsedAssembly firstAssembly = mruList.First();

        Assert.Equal(2, mruList.Count());
        Assert.Equal(@"C:\Foo\Bar.dll", firstAssembly.AssemblyFilename);
    }
 public override void Before(MethodInfo methodUnderTest)
 {
     assemblies = RecentlyUsedAssemblyList.LoadAssemblyList();
     RecentlyUsedAssemblyList.ClearAssemblyList();
 }
 public override void After(MethodInfo methodUnderTest)
 {
     RecentlyUsedAssemblyList.SaveAssemblyList(assemblies);
 }