Beispiel #1
0
        public void Refresh_NoStores_NoException()
        {
            var testSubject = new IssueLocationStoreAggregator(Enumerable.Empty <IIssueLocationStore>());

            Action act = () => testSubject.Refresh(new [] { "test.cpp" });

            act.Should().NotThrow();
        }
Beispiel #2
0
        public void Refresh_NullFilePaths_ArgumentNullException()
        {
            var testSubject = new IssueLocationStoreAggregator(Enumerable.Empty <IIssueLocationStore>());

            Action act = () => testSubject.Refresh(null);

            act.Should().Throw <ArgumentNullException>().And.ParamName.Should().Be("affectedFilePaths");
        }
Beispiel #3
0
        public void Refresh_HasStores_AllStoresRefreshed()
        {
            var stores = new List <Mock <IIssueLocationStore> >
            {
                new Mock <IIssueLocationStore>(),
                new Mock <IIssueLocationStore>(),
                new Mock <IIssueLocationStore>()
            };

            var affectedFilePaths = new[] { "a.cpp", "b.cpp" };

            var testSubject = new IssueLocationStoreAggregator(stores.Select(x => x.Object));

            testSubject.Refresh(affectedFilePaths);

            foreach (var store in stores)
            {
                store.Verify(x => x.Refresh(affectedFilePaths), Times.Once);
            }
        }