public void CleanUpRepository() { _repository = null; }
public void InitializeRepository() { _repository = new GtdActionRepository(); var choose = DateTime.Now.Ticks % MAX; for (int i = 0; i < MAX; i++) { GtdAction act = new GtdAction(Guid.NewGuid(), String.Format(TITLE_TEMPLATE, i), String.Format(DESC_TEMPLATE, i)); _repository.Insert(act); if (choose == i) _action2Find = act; } }
public void InsertTest() { GtdActionRepository repository = new GtdActionRepository(); Guid actionId = Guid.NewGuid(); string title = "Title"; string description = "Description"; GtdAction expectedAction = new GtdAction(actionId, title, description); GtdAction action = null; int cont = 0; repository.Insert(expectedAction); var enumerator = repository.GetEnumerator(); while (enumerator.MoveNext()) { action = enumerator.Current; cont++; } Assert.IsTrue(cont == 1); Assert.IsTrue(action.UniqueId == actionId); }
internal DesignTimeGtdActionCreator(GtdActionRepository rep) { _rep = rep; }