public GList GetList(string id) { var parsedId = int.Parse(id); GList glist = _gListEngine.GetList(parsedId); if (glist == null) { return(null); } return(glist); }
public void GListEngine_GetList() { //Arrange: Seeds the Mocked Accessor's list of GLists and creates the expected list SeedGLists(); var expected = new GList { Id = 2, ListName = "Wednesday Groceries" }; //Act: Calls the GListEngine GetList() method with the id for the "Wednesday Groceries" list var result = gListEngine.GetList(2); //Assert: Checks whether expected and result GList are the same Assert.AreEqual(expected, result, $"GList {result.Id} was returned. GList {expected.Id} was expected."); }