Пример #1
0
        public void CanHandleInt()
        {
            // Arrange
            var options = new Options {Maxlen = 42};

            // Act
            var js = options.ToJS();

            // Assert
            Assert.That(js, Is.StringContaining("maxlen:42"));
        }
Пример #2
0
        public void NoOptionsIsGeneratedOnNullInt()
        {
            // Arrange
            var options = new Options {Maxlen = null};

            // Act
            var js = options.ToJS();

            // Assert
            Assert.That(js, Is.Not.StringContaining("maxlen:"));
        }
Пример #3
0
        public void CanGenerateOptionsWithQuotationMarkTrue()
        {
            // Arrange
            var options = new Options { Quotmark = Options.QuotationMarks.True };

            // Act
            var js = options.ToJS();

            // Assert
            Assert.That(js, Is.StringContaining("quotmark:true"));
        }