Пример #1
0
        public void SetUp()
        {
            _fileWriter = new Mock <ISourceFileWriter>();
            var subject = new UnchangedSource(new [] { "Console.WriteLine()" }, null, _fileWriter.Object);

            subject.WriteAllLines();
        }
Пример #2
0
        public void SetUp()
        {
            _file = new [] { "Console.WriteLine()" };

            _existingLicense = new Mock <ILicense>();
            _existingLicense.Setup(x => x.RemoveFrom(_file)).Returns(_file);

            _newLicense = new Mock <ILicense>();
            _newLicense.Setup(x => x.AddTo(_file)).Returns(_file);

            var subject = new UnchangedSource(_file, _existingLicense.Object, null);

            _result = subject.Add(_newLicense.Object);
        }