public void ResourceLibraryDisposesNativeResources()
        {
            var disposable = MockRepository.GenerateMock <INativeResource>();

            disposable.Stub(f => f.Id).Return(Guid.NewGuid().ToString());
            var disposableUri = ResourcesHelper.NewTestResourceUri(disposable.Id);

            var nondisposable = MockRepository.GenerateMock <IResource>();

            nondisposable.Stub(f => f.Id).Return(Guid.NewGuid().ToString());
            var nondisposableUri = ResourcesHelper.NewTestResourceUri(nondisposable.Id);

            ResourcesHelper.GenerateResourceLoaderMock(true, disposable, nondisposable);

            using (var library = new ResourceLibrary())
            {
                Assert.IsNotNull(library.GetResourceByUri <IResource>(disposableUri));
                Assert.IsNotNull(library.GetResourceByUri <IResource>(nondisposableUri));
            }

            disposable.AssertWasCalled(f => f.Dispose());
        }