예제 #1
0
        public void CurrentVersionIsSameAsServerVersion()
        {
            FakeVersionProvider currentVersion = new FakeVersionProvider("1.0.0.1");
            FakeVersionProvider serverVersion = new FakeVersionProvider("1.0.0.1");
            FakeUpdateResolver updateResolver = new FakeUpdateResolver(true);

            ActiveUpdater activeUpdater = new ActiveUpdater(currentVersion, serverVersion, updateResolver);

            Assert.IsTrue(activeUpdater.UpdateSuccessful());
            Assert.IsFalse(updateResolver.wasCalled);
        }
예제 #2
0
        public void CurrentVersionIsLowerThanServerVersion_UpdateRequested()
        {
            FakeVersionProvider currentVersion = new FakeVersionProvider("1.0.0.1");
            FakeVersionProvider serverVersion = new FakeVersionProvider("1.0.0.2");
            FakeUpdateResolver updateResolver = new FakeUpdateResolver(true);

            ActiveUpdater activeUpdater = new ActiveUpdater(currentVersion, serverVersion, updateResolver);

            Assert.IsTrue(activeUpdater.UpdateSuccessful());
            Assert.IsTrue(updateResolver.wasCalled);
        }