Beispiel #1
0
        public void CreateNewInstanceOfSettingsIfFileDoesNotExistOnReadSettings()
        {
            ISettingsManager <ISettings> settingsManager = new SettingsManager <ISettings>(new BinarySerializer <ISettings>());

            _kontrol = new Kontrol(settingsManager, _mockSyncManager.Object);

            _mockFileInfo.Setup(m => m.Exists).Returns(false);

            _kontrol.ReadSettings(_mockFileInfo.Object);

            _mockSettingsManager.Verify(m => m.Read(It.IsAny <IKoreFileInfo>()), Times.Never);

            Assert.IsNotNull(settingsManager.Data);
        }
Beispiel #2
0
        public void ReadSettings()
        {
            _kontrol.ReadSettings(_mockFileInfo.Object);

            _mockSettingsManager.Verify(m => m.Read(_mockFileInfo.Object));
        }