Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }