Пример #1
0
        public void Reinitialize_NewBuilder_ReturnHtmlWithBeginning()
        {
            // arrange
            _bgEmailBuilder = new BlueGrayEmailBuilder();

            // act
            _bgEmailBuilder.Reinitialize();
            var result = _bgEmailBuilder.GetHTML();

            // assert
            Assert.IsTrue(result.Contains("<head>"));
        }
Пример #2
0
        public void AddText_NewBuilder_ReturnHtmlWithText()
        {
            // arrange
            _bgEmailBuilder = new BlueGrayEmailBuilder();

            // act
            _bgEmailBuilder.AddText("TestText#@!");
            var result = _bgEmailBuilder.GetHTML();

            // assert
            Assert.IsTrue(result.Contains("TestText#@!"));
        }
Пример #3
0
        public void AddSpacer_NewBuilder_ReturnHtmlWithSpacer()
        {
            // arrange
            _bgEmailBuilder = new BlueGrayEmailBuilder();

            // act
            _bgEmailBuilder.AddSpacer();
            var result = _bgEmailBuilder.GetHTML();

            // assert
            Assert.IsTrue(result.Contains("<!-- SPACER -->"));
        }
Пример #4
0
        public void AddCenteredImage_NewBuilder_ReturnHtmlWithImage()
        {
            // arrange
            _bgEmailBuilder = new BlueGrayEmailBuilder();

            // act
            _bgEmailBuilder.AddCenteredImage("TestUrl#@!");
            var result = _bgEmailBuilder.GetHTML();

            // assert
            Assert.IsTrue(result.Contains("TestUrl#@!"));
        }
Пример #5
0
        public void AddButton_NewBuilder_ReturnHtmlWithButton()
        {
            // arrange
            _bgEmailBuilder = new BlueGrayEmailBuilder();

            // act
            _bgEmailBuilder.AddButton("TestBtn#@!", null);
            var result = _bgEmailBuilder.GetHTML();

            // assert
            Assert.IsTrue(result.Contains("TestBtn#@!"));
        }
Пример #6
0
        public void AddHeader_WithHeader_ReturnHtmlWithBothHeaders()
        {
            // arrange
            _bgEmailBuilder = new BlueGrayEmailBuilder();
            _bgEmailBuilder.AddHeader("TestHeader#@!1");

            // act
            _bgEmailBuilder.AddHeader("TestHeader#@!2");
            var result = _bgEmailBuilder.GetHTML();

            // assert
            Assert.IsTrue(result.Contains("TestHeader#@!1") && result.Contains("TestHeader#@!2"));
        }
Пример #7
0
        public void Reinitialize_BuilderWithHeader_ReturnHtmlWithoutHeader()
        {
            // arrange
            _bgEmailBuilder = new BlueGrayEmailBuilder();
            _bgEmailBuilder.AddHeader("TestHeader#@!");

            // act
            _bgEmailBuilder.Reinitialize();
            var result = _bgEmailBuilder.GetHTML();

            // assert
            Assert.IsTrue(!result.Contains("TestHeader#@!"));
        }