public void CanGetTheHighestVersionNumberForVersionControlId()
        {
            const string applicationName = "test";

            ApplicationVersionKeeper classUnderTest = BuildUpClassWithNewApplication(applicationName);
            VersionedApplication application = classUnderTest.GetVersionedApplication(applicationName);

            string firstVersionControlNumber = GenerateRandomVersionControlIdentifier();
            application.RecordBuild(firstVersionControlNumber);
            application.RecordBuild(firstVersionControlNumber);

            string secondVersionControlNumber = GenerateRandomVersionControlIdentifier();

            application.RecordBuild(secondVersionControlNumber);
            application.RecordBuild(secondVersionControlNumber);

            SemVersion version = application.GetHighestVersionForVersionControlId(firstVersionControlNumber);

            Assert.That(version.ToString(), Is.EqualTo("0.0.1+2"));
        }
        public void VersionNumberIncrementedCorrectlyAccrossInstancesOfVersionKeeper()
        {
            const string applicationName = "test";

            var stateStore = new VersionApplicationStateStoreMock();

            ApplicationVersionKeeper firstInstanceOfApplicationVersionKeeper = BuildUpClassWithNewApplication(applicationName, stateStore);
            VersionedApplication application = firstInstanceOfApplicationVersionKeeper.GetVersionedApplication(applicationName);

            string firstVersionControlNumber = GenerateRandomVersionControlIdentifier();
            application.RecordBuild(firstVersionControlNumber);
            application.RecordBuild(firstVersionControlNumber);

            string secondVersionControlNumber = GenerateRandomVersionControlIdentifier();

            application.RecordBuild(secondVersionControlNumber);
            application.RecordBuild(secondVersionControlNumber);
            Assert.That(application.Version.ToString(), Is.EqualTo("0.0.1+2"));

            var secondInstanceOfVersionKeeper = new ApplicationVersionKeeper(stateStore);
            application = secondInstanceOfVersionKeeper.GetVersionedApplication(applicationName);
            
            Assert.That(application.Version.ToString(), Is.EqualTo("0.0.1+2"));
        }