public void Simple_Update_With_Integers() { var temp = new ListRepository<int>(new List<int> { 1, 2, 3, 4, 5 }); temp.Update(5); Assert.AreEqual(temp.ToList()[4], 5); }
public void Simple_Update_With_Integers_No_Match() { var temp = new ListRepository<int>(new List<int> { 1, 2, 3, 4, 5 }); temp.Update(9); Assert.AreNotEqual(temp.ToList()[4], 9); }
public void Simple_Select_With_Integers_And_No_Match() { var temp = new ListRepository<int>(new List<int> { 1, 2, 3, 4, 5 }); var value = temp.FirstOrDefault(val => val == 9); Assert.AreNotEqual(value, 9); }
public void Simple_Select_With_Syntactic_Sugar_Integers() { var temp = new ListRepository<int>(new List<int> { 1, 2, 3, 4, 5 }); var value = (from val in temp where val == 2 select val).FirstOrDefault(); Assert.AreEqual(value, 2); }
public void Simple_Select_With_Integers() { var temp = new ListRepository<int>(new List<int> { 1, 2, 3, 4, 5}); var value = temp.FirstOrDefault(val => val == 2); Assert.AreEqual(value, 2); }
public PatientController() { _patientService = new PatientService(GetConnection()); _visitService = new VisitService(GetConnection()); _listRepository = new ListRepository(GetConnection()); _patientGateway = new PatientGateway(); }
public void Simple_Remove_With_Integers_No_Match() { var temp = new ListRepository<int>(new List<int> { 1, 2, 3, 4, 5 }); var count = temp.Count(); temp.Remove(9); Assert.AreEqual(count, temp.Count()); }
/// <summary> /// View all your lists. /// </summary> public static void ViewAll() { System.Console.WriteLine("Here are your lists:"); var lists = ListRepository.ReadAll(); foreach (var list in lists) { Print.Color("green", "\n" + list.CreatedDateTime + " | ID: " + list.ListId + " | " + list.Title + "\n"); } Startup.Introduction(); }
public void ListRepository_Add_IsNotNullWhenGet() { var dbData = new DalList { Id = 100, Description = "aaa", Title = "aaa" }; var dbSetMock = new Mock<DbSet<OrmList>>(); var dbContextMock = new Mock<EntityModelContext>(); dbContextMock.Setup(x => x.Set<OrmList>()).Returns(dbSetMock.Object); var repo = new ListRepository(dbContextMock.Object); repo.Add(dbData); Assert.IsNotNull(repo.Get(100)); }
public ListService(ListRepository repository) { _repository = repository; }
public AuthController() { userRepo = new UserRepository(); listRepo = new ListRepository(); }
public ListController() { listRepo = new ListRepository(); listMovieRepo = new ListMovieRepository(); listModel = new List(); }
public void Valid_Creation_Of_Instance_With_Empty_Seed() { var temp = new ListRepository<int>(new List<int>()); Assert.IsNotNull(temp); Assert.IsEmpty(temp.ToList()); }
static void Main(string[] args) { var listRepository = new ListRepository<TestEntity>(ListUrl, ListName); var items = listRepository.FindAll(); Console.WriteLine(items.Count); }