/// <inheritdoc />
 public void Save(ExampleDataModel model)
 {
     using (var connection = new SQLiteConnection(_connectionString))
     {
         connection.Insert(model);
     }
 }
Example #2
0
        public void AnotherExampleDataModel_AFunctionWhichReadsAnExternalClassCalledWithGiven_ReturnsExpected()
        {
            //see the AAA format. You don't need to label the sections, just add spaces between them.
            const int expected   = 0;
            var       otherModel = new ExampleDataModel()
            {
                Value = expected
            };

            var value = _model.AFunctionWhichReadsAnExternalClass(otherModel);

            Assert.AreEqual(expected, value);
        }
 public ActionResult SubmitNewExample(ExampleDataModel model)
 {
     m_ExampleRepository.Insert(model);
     return(View());
 }
        public ActionResult Update(Guid UserID)
        {
            ExampleDataModel result = m_ExampleRepository.GetFromID(UserID);

            return(View(result));
        }
 /// <summary>
 /// A tightly bound function which is impossible to unit test.
 /// </summary>
 /// <param name="model"><see cref="ExampleDataModel"/></param>
 /// <returns>The value of the model.</returns>
 public int AFunctionWhichReadsAnExternalClass(ExampleDataModel model)
 {
     return(model.Value);
 }