コード例 #1
0
 public void Persist_Does_Not_Throw_If_Writer_Is_Null()
 {
     var persister = new BaseParamBagPersist();
     var bag = new EmptyParamBag();
     XmlWriter writer = null;
     persister.Persist(bag, writer);
 }
コード例 #2
0
        public void PersistBag()
        {
            var persister = new BaseParamBagPersist();
            var bag = new EmptyParamBag();
            var mockWriter = new Mock<XmlWriter>();

            persister.PersistBag(bag, mockWriter.Object);
        }
コード例 #3
0
        public void Persist_Throws_Ex_If_Bag_Is_Incorrect_Type()
        {
            var persister = new BaseParamBagPersist();
            var mockBag = new Mock<IId>();

            var mockWriter = new Mock<XmlWriter>();

            var ex = Assert.Throws<InvalidCastException>(() => persister.Persist(mockBag.Object, mockWriter.Object));
        }
コード例 #4
0
        public void PersistBag_Does_Not_Throw_If_Bag_IsI_ncorrectType()
        {
            var persister = new BaseParamBagPersist();
            var mockBag = new Mock<IParamBag>();

            var mockWriter = new Mock<XmlWriter>();

            persister.PersistBag(mockBag.Object, mockWriter.Object);
        }
コード例 #5
0
 public void Persist_Does_Not_Throw_If_Bag_Is_Null()
 {
     var persister = new BaseParamBagPersist();
     var mockWriter = new Mock<XmlWriter>();
     persister.Persist(null, mockWriter.Object);
 }