예제 #1
0
        public void SetString_Null_StringNull()
        {
            // Arrange
            RssEmail rssEmail = new RssEmail();

            // Action
            rssEmail.Email = null;

            // Assert
            Assert.AreEqual(null, rssEmail.Email);
        }
예제 #2
0
        public void Ctor_ValidEmailParameter_Ok()
        {
            // Arrange
            const string Email = "*****@*****.**";

            // Action
            RssEmail rssEmail = new RssEmail(Email);

            // Assert
            Assert.AreEqual(Email, rssEmail.Email);
        }
예제 #3
0
        public void SetEmail_ValidDateParameter_Ok()
        {
            // Arrange
            RssEmail rssEmail = new RssEmail();
            const string Email = "*****@*****.**";

            // Action
            rssEmail.Email = Email;

            // Assert
            Assert.AreEqual(Email, rssEmail.Email);
        }
예제 #4
0
        public void SetEmail_InvalidEmail_Error()
        {
            // Arrange
            const string Email = "invalidmail.ru";
            RssEmail rssEmail = new RssEmail();

            // Action
            RSSParameterException e = null;
            try
            {
                rssEmail.Email = Email;
            }
            catch (RSSParameterException ex)
            {
                e = ex;
            }

            // Assert
            Assert.IsNotNull(e);
        }