public void Test_AddNewUser() { RecordRepository recordRepository = RecordRepository.getInstance(); string username = "******"; recordRepository.AddUserToDictionary(username, new List <Record>()); bool status = recordRepository.getUserRecords().ContainsKey("username"); Assert.IsTrue(status); }
public void Test_GetRecordById() { RecordRepository recordRepository = RecordRepository.getInstance(); Record record = new Record("Happy", "", "01/01/2020", "", ""); string username = "******"; bool status = false; recordRepository.AddUserToDictionary(username, new List <Record>()); recordRepository.addNewRecord(record, username); Record foundRecord = recordRepository.getRecordByID(username, "01/01/2020"); if (foundRecord.Feeling != "") { status = true; } Assert.IsTrue(status); }