Exemple #1
0
        public void Initialize()
        {
            moq_personDataLayer = new Mock <IPersonDataLayer>();

            moq_personDataLayer.Setup(dl => dl.CreateRecord(It.IsAny <string>()))
            .Returns("Record created successfully");

            moq_personDataLayer.Setup(m => m.GetTextData())
            .Returns(new string[] { "Allen, Michael, Male, Blue, 08/21/1991",
                                    "Allen | Brandon | Male | Red | 03/17/1990",
                                    "Rosier Lori Female Pink 12/10/1968" });

            personBusinessLayer = new PersonBusinessLayer(moq_personDataLayer.Object);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="PersonController"/> class.
 /// </summary>
 /// <param name="personBusinessLayer">The Request</param>
 public PersonController(IPersonBusinessLayer personBusinessLayer)
 {
     this.personBusinessLayer = personBusinessLayer;
 }