public void CleanupModConfig() { // Make a new mod config. var testConfig = new ModConfig { ModImage = RandomString(RandomStringLength), ModDependencies = new[] { RandomString(RandomStringLength), RandomString(RandomStringLength), _realModConfig.ModId } // Default Mod ID }; // Remove fake dependencies from config. testConfig.CleanupConfig(_realModConfigFilePath); // Check that the only dependency left is the real one. Assert.True(testConfig.ModDependencies.Length == 1); Assert.True(testConfig.ModDependencies[0] == _realModConfig.ModId); Assert.True(String.IsNullOrEmpty(testConfig.ModImage)); }