public VersionCliTest() { _vcsTool = A.Fake <IVcs>(opts => opts.Strict()); A.CallTo(() => _vcsTool.ToolName()).Returns("_FAKE_"); _fileDetector = A.Fake <ProjectFileDetector>(); _fileParser = A.Fake <ProjectFileParser>(); _filePatcher = A.Fake <ProjectFileVersionPatcher>(); A.CallTo(() => _fileDetector.FindAndLoadCsProj(A <string> ._)).Returns("<Project/>"); const string csProjFilePath = "/unit-test/test.csproj"; A.CallTo(() => _fileDetector.ResolvedCsProjFile).Returns(csProjFilePath); A.CallTo(() => _fileParser.Load(A <string> ._)).DoesNothing(); A.CallTo(() => _fileParser.Version).Returns("1.2.1"); _cli = new VersionCli( _vcsTool, _fileDetector, _fileParser, _filePatcher, new SemVerBumper() ); }
public VersionCli( IVcs vcsClient, ProjectFileDetector fileDetector, ProjectFileParser fileParser, ProjectFileVersionPatcher fileVersionPatcher ) { _vcsTool = vcsClient; _fileDetector = fileDetector; _fileParser = fileParser; _fileVersionPatcher = fileVersionPatcher; }