Пример #1
0
        public void ArmaConfigDebinarizer_ValidFile_DebinarizesFileAndSavesCorrectly()
        {
            //Arrange
            File.WriteAllBytes(_configFilePath, Resources.test_vars);

            //Act
            _configDebinarizer.DebinarizeConfigFile(_configFilePath, _debinarizedFilePath);

            //Assert
            FileAssert.Exists(_debinarizedFilePath);
            Assert.AreEqual(432973, File.ReadAllLines(_debinarizedFilePath).Length);
        }
Пример #2
0
        public void DebinarizeConfigFile_EmptySourcePath_ThrowsException()
        {
            //Arrange
            _fileWrapper.Setup(x => x.Exists(It.IsAny <string>())).Returns(true);

            //Act/Assert
            Assert.Throws <ArgumentException>(() => _configDebinarizer.DebinarizeConfigFile(string.Empty, @"C:\CoolPath\debinarized.cpp"));
        }