Exemplo n.º 1
0
        public void GetInline_OkMessageBox_GeneratedCorrectly()
        {
            var tf = new Mock<ITemplateFactory>();
            tf.Setup(x => x.Load(It.Is<string>(c => c.EndsWith("InlineOkMessageBox.tpl")))).Returns(new Template("{Message}", false));

            var st = new Mock<IStringTable>();
            var dc = new Mock<IDataCollector>();

            var mb = new MessageBox(tf.Object, st.Object, dc.Object);
            Assert.AreEqual("Foo data", mb.GetInline("Foo data", MessageBoxStatus.Ok));
        }
Exemplo n.º 2
0
 public void GetInline_NullParameters_ExceptionsThrown()
 {
     var mb = new MessageBox(null, null, null);
     Assert.Throws<ArgumentNullException>(() => mb.GetInline(null));
 }