public void GListEngine_UpdateList() { //Arrange: Seeds the Mocked Accessor's list of GLists and creates an updated GList SeedGLists(); var expected = new GList() { Id = 2, ListName = "Updated" }; //Act: Calls the GListEngine UpdateList() and uses the GetState() method to retrieve the Mocked Accessor's list gListEngine.UpdateList(2, expected); List <GList> results = mockedGListAccessor.GetState(); //Assert: Checks if the GList's name was successfully updated Assert.AreEqual(expected.ListName, results.ElementAt(2).ListName, "The GList wasn't updated correctly."); }
public void PutList(string id, GList glist) { var parsedId = int.Parse(id); _gListEngine.UpdateList(parsedId, glist); }