public void AddPresetTest() { bool condition = false; PresetFilters target = new PresetFilters(); string presetName = null; List<string> types = null; try { target.AddPreset(presetName, types); } catch (ArgumentException AEx) { condition = true; } Assert.IsTrue(condition); condition = true; presetName = "MockPreset"; types = new List<string>() { "mp3" }; try { target.AddPreset(presetName, types); } catch (ArgumentException AEx) { condition = false; } Assert.IsTrue(condition); }
public void RemovePresetTypeTest() { PresetFilters target = new PresetFilters(); string presetName = "MockingBird"; List<string> types = new List<string>() { "MockING" }; target.AddPreset(presetName, types); target.RemovePresetType(presetName, "MockING"); Assert.IsFalse(target.PresetTypeExists(presetName, "MockING"), "Added type does not appear to exist"); }
public void PresetTypeExistsTest() { PresetFilters target = new PresetFilters(); string presetName = "AreYouMockingMe"; List<string> types = new List<string>() { "Yes" }; target.AddPreset(presetName, types); Assert.IsTrue(target.PresetTypeExists(presetName, "Yes"), "Added type does not appear to exist"); }
public void PresetExistsTest() { PresetFilters target = new PresetFilters(); string presetName = "MockedYouOut"; List<string> types = new List<string>() { "Mocking" }; target.AddPreset(presetName, types); Assert.IsTrue(target.PresetExists(presetName), "Added preset does not appear to exist"); }
public void GetPresetTypesTest() { PresetFilters target = new PresetFilters(); string presetName = "MockedOut"; List<string> types = new List<string>() { "Mocking" }; target.AddPreset(presetName, types); List<string> returnTypes = target.GetPresetTypes(presetName); Assert.IsTrue(returnTypes.Contains("Mocking"), "Added type has not been found"); }
public void EditPresetsTest() { PresetFilters target = new PresetFilters(); string presetName = "MockedUp"; List<string> types = new List<string>() { "Mocking" }; target.AddPreset(presetName, types); List<string> newTypes = new List<string>() { "Mark" }; string newName = "Marking"; target.EditPresets(presetName, newName, newTypes); Assert.IsTrue(target.PresetExists("Marking"), "Preset name has not been changed"); Assert.IsTrue(target.PresetTypeExists("Marking", "Mark"), "New types have not been added"); }