コード例 #1
0
 public void EnsureTaskCanBeAdded()
 {
     var name = new Guid().ToString("N");
     var task = new TaskItem(name);
     var repo = new TaskItemRepository(connectionString);
     var newId = repo.AddTask(task);
     Assert.IsTrue(newId > 0);
 }
コード例 #2
0
        public void EnsureTaskIsCorrectlyAdded()
        {
            var name = new Guid().ToString("N");
            var task = new TaskItem(name);

            var repo = new TaskItemRepository(connectionString);
            var newId = repo.AddTask(task);

            var loadedTask = repo.GetTask(newId);

            Assert.IsNotNull(loadedTask);
            Assert.AreEqual(newId, loadedTask.Id);
            Assert.AreEqual(name, loadedTask.Name);
            Assert.AreEqual(false, loadedTask.IsComplete);
        }
コード例 #3
0
 public void EnsureRepositoryCanBeLoaded()
 {
     var repo = new TaskItemRepository(connectionString);
     var transactionOptions = new TransactionOptions {IsolationLevel = IsolationLevel.Serializable};
     var tasks = repo.GetAllTasks();
 }
コード例 #4
0
 public void EnsureRepositoryCanBeCreated()
 {
     var repo = new TaskItemRepository(connectionString);
 }