Example #1
0
        public void AddInfo_Message()
        {
            container.AddInfo("Message", 1);

            Alert actual = container.Single();

            Assert.Equal(AlertType.Info, actual.Type);
            Assert.Equal("Message", actual.Message);
            Assert.Equal(1, actual.Timeout);
        }
        public void Add_TypedMessage()
        {
            container.Add(AlertType.Success, "Message");

            Alert actual = container.Single();

            Assert.Equal(AlertType.Success, actual.Type);
            Assert.Equal("Message", actual.Message);
            Assert.Equal(4000, actual.Timeout);
        }
Example #3
0
        public void Add_TypedMessage()
        {
            container.Add(AlertType.Success, "Message");

            Alert actual = container.Single();

            Assert.Equal(AlertsContainer.DefaultFadeout, actual.FadeoutAfter);
            Assert.Equal(AlertType.Success, actual.Type);
            Assert.Equal("Message", actual.Message);
        }
Example #4
0
        public void Add_AddsTypedMessage()
        {
            container.Add(AlertTypes.Danger, "Test");

            Alert actual = container.Single();

            Assert.AreEqual(AlertsContainer.DefaultFadeout, actual.FadeoutAfter);
            Assert.AreEqual(AlertTypes.Danger, actual.Type);
            Assert.AreEqual("Test", actual.Message);
        }
Example #5
0
        public void Add_AddsAlert()
        {
            Alert alert = new Alert();

            alerts.Add(alert);

            Alert actual   = alerts.Single();
            Alert expected = alert;

            Assert.AreSame(expected, actual);
        }