public async void Test_Delete() { var vodProgram = new VodProgram(fixture.VodId, logger); // Load the program and save it Cosmos DB Assert.True(await vodProgram.Get()); // Delete it from Cosmos DB Assert.True(await vodProgram.Delete()); // Load the program and save it Cosmos DB again so that it can be returned to the client Assert.True(await vodProgram.Get()); }
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()); }