Пример #1
0
 private PackageSourceService InitializeService()
 {
     return SourceService = new PackageSourceService(
         XmlSourceStore.CreateMachine(),
         XmlSourceStore.CreateUser(),
         GetSessionStore());
 }
Пример #2
0
        public void UserSourcesOverrideMachineSources()
        {
            // Arrange
            PackageSourceService service = new PackageSourceService(
                new InMemorySourceStore(new[] {
                    new PackageSource("http://foo.bar", "Foo")
                }),
                new InMemorySourceStore(new[] {
                    new PackageSource("http://biz.baz", "Foo")
                }),
                new InMemorySourceStore());

            // Act
            PackageSource src = service.AllSources.Single();

            // Assert
            Assert.Equal(new PackageSource("http://biz.baz", "Foo"), src);
        }