Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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");
        }
Exemplo n.º 3
0
        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");
        }
Exemplo n.º 4
0
        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");
        }
Exemplo n.º 5
0
        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");
        }
Exemplo n.º 6
0
        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");
        }