Inheritance: IRefreshable
Exemplo n.º 1
0
 public void testCallable()
 {
     MockRefreshable mock = new MockRefreshable();
     IRefreshable helper = new RefreshHelper(mock.call);
     helper.Refresh(null);
     Assert.AreEqual(1, mock.getCallCount());
 }
Exemplo n.º 2
0
        public void testCallable()
        {
            MockRefreshable mock   = new MockRefreshable();
            IRefreshable    helper = new RefreshHelper(mock.call);

            helper.Refresh(null);
            Assert.AreEqual(1, mock.getCallCount());
        }
Exemplo n.º 3
0
 public void testDependencies()
 {
     RefreshHelper helper = new RefreshHelper(null);
     MockRefreshable mock1 = new MockRefreshable();
     MockRefreshable mock2 = new MockRefreshable();
     helper.AddDependency(mock1);
     helper.AddDependency(mock2);
     helper.Refresh(null);
     Assert.AreEqual(1, mock1.getCallCount());
     Assert.AreEqual(1, mock2.getCallCount());
 }
Exemplo n.º 4
0
        public void testDependencies()
        {
            RefreshHelper   helper = new RefreshHelper(null);
            MockRefreshable mock1  = new MockRefreshable();
            MockRefreshable mock2  = new MockRefreshable();

            helper.AddDependency(mock1);
            helper.AddDependency(mock2);
            helper.Refresh(null);
            Assert.AreEqual(1, mock1.getCallCount());
            Assert.AreEqual(1, mock2.getCallCount());
        }
Exemplo n.º 5
0
 public void testAlreadyRefreshed()
 {
     RefreshHelper helper = new RefreshHelper(null);
     MockRefreshable mock1 = new MockRefreshable();
     MockRefreshable mock2 = new MockRefreshable();
     helper.AddDependency(mock1);
     helper.AddDependency(mock2);
     IList<IRefreshable> alreadyRefreshed = new List<IRefreshable>(1);
     alreadyRefreshed.Add(mock1);
     helper.Refresh(alreadyRefreshed);
     Assert.AreEqual(0, mock1.getCallCount());
     Assert.AreEqual(1, mock2.getCallCount());
 }
Exemplo n.º 6
0
        public void testAlreadyRefreshed()
        {
            RefreshHelper   helper = new RefreshHelper(null);
            MockRefreshable mock1  = new MockRefreshable();
            MockRefreshable mock2  = new MockRefreshable();

            helper.AddDependency(mock1);
            helper.AddDependency(mock2);
            IList <IRefreshable> alreadyRefreshed = new List <IRefreshable>(1);

            alreadyRefreshed.Add(mock1);
            helper.Refresh(alreadyRefreshed);
            Assert.AreEqual(0, mock1.getCallCount());
            Assert.AreEqual(1, mock2.getCallCount());
        }