コード例 #1
0
		public void WithSignature_When_called_for_too_long_signature_Then_throws_argumentException()
		{
			var signature = "too-long-parameter-signature-with-too-many-letters-and-words";
			var parameterDefinition = GetValidParameterDefinition();

			var parameterConfiguration =
				new ParameterConfiguration(parameterDefinition);

			Assert.Throws<ArgumentException>(() => parameterConfiguration.WithSignature(signature));
		}
コード例 #2
0
		public void WithSignature_When_called_for_signature_containing_special_character_Then_throws_argumentException()
		{
			var signature = "signature#with#hashtags";
			var parameterDefinition = GetValidParameterDefinition();

			var parameterConfiguration =
				new ParameterConfiguration(parameterDefinition);

			Assert.Throws<ArgumentException>(() => parameterConfiguration.WithSignature(signature));
		}
コード例 #3
0
			WithSignature_When_called_for_lowercase_alpha_signature_with_dashes_Then_sets_parameterDefinition_signature()
		{
			var signature = "signature-with-dash";
			var parameterDefinition = GetValidParameterDefinition();

			var parameterConfiguration =
				new ParameterConfiguration(parameterDefinition);

			parameterConfiguration.WithSignature(signature);

			Assert.Equal(signature, parameterDefinition.Signature);
		}
コード例 #4
0
		public void WithSignature_When_called_for_lowercase_alзha_signature_Then_sets_parameterDefinition_signature()
		{
			var signature = "signature";
			var parameterDefinition = GetValidParameterDefinition();

			var parameterConfiguration =
				new ParameterConfiguration(parameterDefinition);

			parameterConfiguration.WithSignature(signature);

			Assert.Equal(signature, parameterDefinition.Signature);
		}
コード例 #5
0
		public void WithSignature_When_called_for_null_Then_throws_argumentNullException()
		{
			var parameterDefinition = GetValidParameterDefinition();

			var parameterConfiguration =
				new ParameterConfiguration(parameterDefinition);

			Assert.Throws<ArgumentNullException>(() => parameterConfiguration.WithSignature(null));
		}