public void ShouldLogErrorMessages()
        {
            @"Given unsaved plugin profile
				And profile repository path is 'http://unknownhost'
			When checked connection
			Then log should contain message: Connection failed.
			"
            .Execute(In.Context <CommandActionSteps>().And <VcsPluginActionSteps>());
        }
        public void ShouldFailOnInvalidRepository()
        {
            @"Given unsaved plugin profile
				And profile repository path is 'https://localhost:443/nosuchrepo'
			When checked connection
			Then error should occur for Uri: ""Invalid path to repository. See plugin log for details.""
			"
            .Execute(In.Context <CommandActionSteps>());
        }
        public void ShouldFailOnInvalidHost()
        {
            @"Given unsaved plugin profile
				And profile repository path is 'http://unknownhost'
			When checked connection
			Then error should occur for Uri: ""Could not connect to server. See plugin log for details.|Timeout while connecting to svn repository http://unknownhost. See plugin log for details.""
			"
            .Execute(In.Context <CommandActionSteps>());
        }
        public void ShouldImportRevisionsStartingFromOldOnes()
        {
            @"Given account name is 'Account'
					And profile name is 'ProfileName'
					And the last imported revision is 235
				When legacy subversion plugin profile from Target Process converted to new subversion plugin profile
				Then subversion starting revision should be 236"
            .Execute(In.Context <LegacyProfileConverterActionSteps>());
        }
Пример #5
0
        public void ShouldFailIfProfileDoesNotExist()
        {
            @"Given profile with name 'Profile1' for account 'Account'
					And profile with name 'Profile2' for account 'Account'
				When synchronization is forced for acccount 'Account' for profile 'Profile3'
				Then synchronization should not be started for any profile
					And command should fail"
            .Execute(In.Context <WhenAddANewProfileSpecs>().And <SyncNowCommandSpecs>());
        }
Пример #6
0
        public void ShouldReplaceIncorrectCharactersWithUnderscoresWhenConvertedTwice()
        {
            @"Given account name is 'Account'
					And profile name is 'Profile!@#$%^&*()+={}[]\|/?.>,<`~'
					And legacy subversion plugin profile from Target Process converted to new subversion plugin profile
				When legacy subversion plugin profile from Target Process converted to new subversion plugin profile
				Then plugin profiles should be created: Profile__________________________, Profile__________________________ _re-converted_"
            .Execute(In.Context <LegacyProfileConverterActionSteps>());
        }
        public void ShouldFailOnBadUriFormat()
        {
            @"Given unsaved plugin profile
				And profile repository path is 'invalidauri'
			When checked connection
			Then error should occur	for Uri: ""Bad url format.""
			"
            .Execute(In.Context <CommandActionSteps>());
        }
Пример #8
0
        public void WhenNoEntityIdProvidedShouldNotCreateRevision()
        {
            @"Given vcs history is:
					|commit|
					|{Id:1, Comment:""time:1 state:fixed comment:hello world"", Author:""John""}|
				When plugin started up
				Then 0 revisions should be created in TP"
            .Execute(In.Context <VcsPluginActionSteps>().And <ShouldProcessEntityIdSpecs>().And <UserMappingFeatureActionSteps>());
        }
        public void GeneralCommandShouldBeParsed()
        {
            @"
				When parsed comment: id:123 time:1 state:fixed but not verified comment:hello world  
				Then 1 command should be parsed
					And commands should be:
					|ids	|actions								|times								|comments			|
					|123	|fixed but not verified	|spent:1,left:-1			|hello world	|"
            .Execute(In.Context <CommentParserActionSteps>());
        }
        public void ShouldCheckDelete()
        {
            @"
				Given bugzilla profile for project 1 created
					And set project with id 1 and name 'project 1' to storage
				When handled ProjectDeletedMessage message with project id 1
				Then projects storage should contain 0 items
			"
            .Execute(In.Context <BugSyncActionSteps>().And <ProjectChangedHandlerSpecs>());
        }
Пример #11
0
        public void ShouldProvideMappingResultInfoWhenAllSubversionUsersWereMapped()
        {
            @"Given vcs history contains 5 svn users
					And 5 svn users mapped to TP users
					And 40 unmapped TP users
					And unsaved plugin profile
				When automapping requested
				Then mapping result info should be: All the 5 Subversion user(s) were mapped"
            .Execute(In.Context <VcsPluginActionSteps>().And <CommandActionSteps>());
        }
Пример #12
0
        public void ShouldProvideMappingResultInfo()
        {
            @"Given vcs history contains 20 svn users
					And 5 svn users mapped to TP users
					And 40 unmapped TP users
					And unsaved plugin profile
				When automapping requested
				Then mapping result info should be: 5 Subversion user(s) were mapped, and no matches were found for 15 Subversion user(s)"
            .Execute(In.Context <VcsPluginActionSteps>().And <CommandActionSteps>());
        }
Пример #13
0
        public void ShouldPublishPluginInfoMessagesWithProfileDataUponTargetProcessStartUp()
        {
            @"
				Given profile 'Profile' for account 'Account' created
					And plugin started up
				When plugin receives TargetProcessStartedMessage
				Then PluginInfoMessage should be published 
					And PluginAccountMessage should be published with account 'Account' and profile 'Profile'"
            .Execute(In.Context <PluginLifecycleActionSteps>().And <ProfileStorageSpecs>());
        }
        public void ShouldFailOnNonnumericRevision()
        {
            @"Given unsaved plugin profile
				And profile local repository path is '.\TestRepository'
				And profile start revision is startrevision
			When checked connection
			Then error should occur for StartRevision: ""Start Revision should be a number.""
			"
            .Execute(In.Context <CommandActionSteps>());
        }
Пример #15
0
        public void ValidationShouldFailOnNonNumericRevision()
        {
            @"Given unsaved plugin profile
				And profile start revision is startrevision
			When saved
			Then error should occur for StartRevision: ""Start Revision should be a number.""
			"
            .Execute(
                In.Context <CommandActionSteps>());
        }
Пример #16
0
 public void ShouldAutomapUsersByLogin()
 {
     @"Given vcs history is:
             |commit|
             |{Id:1, Author:""john"", Comment:""#123""}|
         And tp user with name 'John Smith', login 'john' and id 1
         When plugin started up
         Then revision 1 in TP should have author 'John Smith'"
         .Execute(In.Context<VcsPluginActionSteps>().And<WhenCommitMadeByTpUserSpecs>().And<UserMappingFeatureActionSteps>());
 }
        public void ShouldAddProfilesWhenConverterRunTheSecondTime()
        {
            @"Given account name is 'Account'
					And profile name is 'ProfileName'
					And legacy subversion plugin profile from Target Process converted to new subversion plugin profile
				When legacy subversion plugin profile from Target Process converted to new subversion plugin profile
				Then 2 plugin profiles should be created
					And plugin profile names should be unique"
            .Execute(In.Context <LegacyProfileConverterActionSteps>());
        }
        public void ShouldProcessOnlyNewRevisionsWhenSyncronized()
        {
            @"Given repository with 250 revisions
					And profile Start Revision is 110
				And plugin started up
				When another 75 revisions committed to vcs
					And plugin synchronized
				Then 75 revisions should be created in TP"
            .Execute(In.Context <VcsPluginActionSteps>().And <ProcessNewRevisionOnlyFeature>());
        }
        public void TimeLeftCommandsShouldBeParsed()
        {
            @"
				When parsed comment: id:123 id:456 time:1:2 state:fixed comment:hello world  time:2:3 state:fixed2 comment:comment2
				Then 1 command should be parsed
					And commands should be:
					|ids			|actions			|times													|comments							|
					|123,456	|fixed,fixed2	|spent:1,left:2,spent:2,left:3	|hello world,comment2	|"
            .Execute(In.Context <CommentParserActionSteps>());
        }
Пример #20
0
        public void ValidateUriConsistingOfWhitespaces()
        {
            @"Given unsaved plugin profile
				And profile repository path is '   '
			When saved
			Then error should occur for Uri: ""Uri should not be empty.""
			"
            .Execute(
                In.Context <CommandActionSteps>());
        }
        public void IdOnlyShouldBeParsed()
        {
            @"Given comment is: id: 1
				When comment parsed
				Then 1 command should be parsed
					And commands should be:
					|ids			|actions	|times	|comments	|
					|1				|					|				|					|"
            .Execute(In.Context <CommentParserActionSteps>());
        }
        public void ShouldFailOnNegativeRevision()
        {
            @"Given unsaved plugin profile
				And profile local repository path is '.\TestRepository'
				And profile start revision is -1
			When checked connection
			Then error should occur for StartRevision: ""Start Revision cannot be less than zero.""
			"
            .Execute(In.Context <CommandActionSteps>());
        }
Пример #23
0
        public void ValidationShouldFailOnNegativeRevision()
        {
            @"Given unsaved plugin profile
				And profile start revision is -1
			When saved
			Then error should occur for StartRevision: ""Start Revision cannot be less than zero.""
			"
            .Execute(
                In.Context <CommandActionSteps>());
        }
        public void ShouldRetrieveSagaByProperty()
        {
            @"
			Given plugin in local database mode
				And store account 'Account1' with profiles: Profile1_1
				And test saga with value 'testValue' started by profile 'Profile1_1'
			When test saga data is persisted
			Then saga persister should be able to retrieve test saga by 'TestValue' property with value 'testValue' for profile 'Profile1_1'"
            .Execute(In.Context <PluginSqlPersisterSpecs>().And <TpDatabaseSagaPersisterSpecs>());
        }
Пример #25
0
        public void ValidationShouldFailOnUriWithSsh()
        {
            @"Given unsaved plugin profile
				And profile repository path is 'svn+ssh://[email protected]/path'
			When saved
			Then error should occur for Uri: ""Connection via SSH is not supported.""
			"
            .Execute(
                In.Context <CommandActionSteps>());
        }
        public void ShouldRetrieveSagaByIdPropertyFast()
        {
            @"
			Given plugin in local database mode
				And store account 'Account1' with profiles: Profile1_1
				And test saga with id '098d0873-71bb-4dcf-99f5-059024aa79b8' started by profile 'Profile1_1'
			When test saga data is persisted
			Then saga persister should be able to retrieve test saga by id property with value '098d0873-71bb-4dcf-99f5-059024aa79b8' for profile 'Profile1_1'"
            .Execute(In.Context <PluginSqlPersisterSpecs>().And <TpDatabaseSagaPersisterSpecs>());
        }
Пример #27
0
        public void ShouldChangeStatusToMultipleEntities()
        {
            @"Given tp user 'tpuser' with id 5
					And vcs user 'svnuser' mapped as 'tpuser'
					And vcs commit is: {Id:1, Comment:""#123 status:ready to be fixed #33 status: updated"", Author:""svnuser""}
				When plugin started up
				Then entity 123 status should be changed to 'ready to be fixed' by the 'tpuser'
					And entity 33 status should be changed to 'updated' by the 'tpuser'"
            .Execute(In.Context <VcsPluginActionSteps>().And <WhenCommitMadeByTpUserSpecs>().And <ShouldChangeStatusSpecs>().And <UserMappingFeatureActionSteps>());
        }
        public void ShouldNotCreateRequestIfEmailSentByTargetProcess()
        {
            @"Given TargetProcess with email '*****@*****.**'
					And project 7
					And profile has a rule: then create request in project 7
					And sender email is '*****@*****.**'
				When the email arrived
				Then no request should be created from the message"
            .Execute(In.Context <EmailProcessingSagaActionSteps>());
        }
        public void ShouldPostCommentToMultipleEntities()
        {
            @"Given tp user 'tpuser' with id 5
					And vcs user 'svnuser' mapped as 'tpuser'
					And vcs commit is: {Id:1, Comment:""#123 comment:bla-bla my comment #55 cmt: another comment"", Author:""svnuser""}
				When plugin started up
				Then comment 'bla-bla my comment' should be posted on entity 123 by the 'tpuser'
					And comment 'another comment' should be posted on entity 55 by the 'tpuser'"
            .Execute(In.Context <VcsPluginActionSteps>().And <WhenCommitMadeByTpUserSpecs>().And <ShouldPostCommentSpecs>().And <UserMappingFeatureActionSteps>());
        }
        public void ShouldHandleParserFailure()
        {
            @"Given vcs history is:
					|commit|
					|{Id:1, Comment:"""", Author:""John"",Time:""10.01.2000"", Entries:[{Path:""/root/file1.txt"", Action:""Add""}]}|
					And profile Start Revision is 1
				When plugin started up
				Then there should be no uncompleted attach to entity sagas"
            .Execute(In.Context <VcsPluginActionSteps>().And <WhenVcsRevisionContainsEntityId>());
        }