示例#1
0
 public void ProfilesShouldBeReturned(string[] profileNames)
 {
     _response.PluginCommandStatus.Should(Be.EqualTo(PluginCommandStatus.Succeed));
     foreach (var profileName in profileNames)
     {
         _response.ResponseData.Should(Be.StringContaining(profileName));
     }
 }
示例#2
0
        private void ReadAccountProfiles(string accountName)
        {
            var account = AccountCollection.GetOrCreate(accountName);

            foreach (var profile in account.Profiles)
            {
                profile.Name.Value.Should(Be.StringContaining("profile"));
            }
        }
示例#3
0
        public void SignUri_WhenCalled_ShouldReturnUriWithTheApiKey()
        {
            //arrange
            var sut = new UriSignedConstructor(new SignatureConstructor(), new SignatureHasher(_secretKey), _apiKey);


            //act
            var actual = sut.SignUri(_uri, _now).ToString();

            //assert
            actual.Should(Be.StringContaining("apikey=" + _apiKey));
        }
示例#4
0
        public void SignUri_WhenCalled_ShouldReturnUriWithSignature()
        {
            //arrange
            var hasher = new SignatureHasher(_secretKey);
            var signatureConstructor = new SignatureConstructor();

            var sut = new UriSignedConstructor(signatureConstructor, hasher, _apiKey);

            //act
            var actual = sut.SignUri(_uri, _now).ToString();

            //assert
            var sigValue = WebUtility.UrlEncode(hasher.Hash(signatureConstructor.BuildSignature(_uri, _now)));

            actual.Should(Be.StringContaining("sig=" + sigValue));
        }
        private void ReadProfile()
        {
            var profile = _account.Profiles["Profile"];

            profile.GetProfile <SampleJiraProfile>().JiraLogin.Should(Be.StringContaining("JiraLogin"));
        }
示例#6
0
        public void EmailPluginProfileShouldContainsRule(string rule, string projectAbbr)
        {
            var projectId = Context.Projects.First(x => x.Abbreviation == projectAbbr).ProjectID;

            Profile.Rules.Should(Be.StringContaining(rule.Replace("ProjectId", projectId.ToString())));
        }