Exemple #1
0
        public void HasValidCustomHeaders_ReturnsTrue_WhenDictionaryIsNull()
        {
            //Arrange
            var customHeaders = new List <ICustomHeader>();
            var validator     = new SendValidator();

            //Act
            var actual = validator.HasValidCustomHeaders(customHeaders);

            //Assert
            Assert.IsTrue(actual);
        }
Exemple #2
0
        public void HasValidCustomHeaders_ReturnsTrue_WhenDictionaryIsValid()
        {
            //Arrange
            var customHeaders = new List <ICustomHeader>
            {
                new CustomHeader(RandomHelper.RandomString(), RandomHelper.RandomString())
            };
            var validator = new SendValidator();

            //Act
            var actual = validator.HasValidCustomHeaders(customHeaders);

            //Assert
            Assert.IsTrue(actual);
        }
Exemple #3
0
        public void HasValidCustomHeaders_ReturnsFalse_WhenKeyIsEmptyAndValueIsNotEmpty()
        {
            //Arrange
            var customHeaders = new List <ICustomHeader>
            {
                new CustomHeader(string.Empty, RandomHelper.RandomString())
            };
            var validator = new SendValidator();

            //Act
            var actual = validator.HasValidCustomHeaders(customHeaders);

            //Assert
            Assert.IsFalse(actual);
        }
Exemple #4
0
        public void HasValidCustomHeaders_ReturnsFalse_WhenKeyAndValueAreEmpty()
        {
            //Arrange
            var customHeaders = new List <ICustomHeader>
            {
                new CustomHeader(string.Empty, string.Empty)
            };
            var validator = new SendValidator();

            //Act
            var actual = validator.HasValidCustomHeaders(customHeaders);

            //Assert
            Assert.IsFalse(actual);
        }