public async void Test_Save() { var vodProgram = new VodProgram(fixture.VodId, logger); Assert.True(await vodProgram.GetFromNHK()); Assert.True(await vodProgram.Save()); Assert.NotEmpty(vodProgram.Title); }
public async void Test_PopulateCache() { // Creating a dummy program that will be deleted so we can test that code path var vodProgram = new VodProgram("Unit Test Dummy", logger); Assert.True(await vodProgram.Save()); vodProgram = new VodProgram(fixture.VodId, logger); // Delete an existing VodId that should be populated again Assert.True(await vodProgram.Delete()); var success = await VodProgramList.PopulateCloudCache(logger); Assert.True(success); // Load the program and save it Cosmos DB again so that it can be returned to the client Assert.True(await vodProgram.Get()); }