public void SeleniumGenerator_MakePropertyNameUnique()
        {
            // initialize
            var myGenerator = new MySeleniumGeneratorTestClass();
            var usedNames   = new List <string> {
                "First", "Second", "Third"
            };
            var testString     = "Fourth";
            var expectedString = "Fourth";

            // do
            var resultString = myGenerator.MakePropertyNameUnique(usedNames, testString);

            // assert
            Assert.AreEqual(expectedString, resultString);
        }
        public void SeleniumGeneratorOptions_TryAddSameGenerators()
        {
            // initialize
            var options     = new SeleniumGeneratorOptions();
            var myGenerator = new MySeleniumGeneratorTestClass();

            // do
            options.AddCustomGenerator(myGenerator);
            options.AddCustomGenerator(myGenerator);

            // assert
            if (options.GetCustomGenerators().Count == 1)
            {
                Assert.AreEqual(myGenerator, options.GetCustomGenerators().First());
            }
            else
            {
                Assert.Fail();
            }
        }
        public void SeleniumGeneratorOptions_AddAssembly()
        {
            // initialize
            var options    = new SeleniumGeneratorOptions();
            var myAssembly = new MySeleniumGeneratorTestClass().GetType().Assembly;

            // do
            options.AddAssembly(myAssembly);

            // assert
            var foundAssembly = options.GetAssemblies().FirstOrDefault(b => b.Equals(myAssembly));

            if (foundAssembly != null)
            {
                Assert.AreEqual(myAssembly, foundAssembly);
            }
            else
            {
                Assert.Fail();
            }
        }
        public void SeleniumGeneratorOptions_AddCustomGenerator()
        {
            // initialize
            var options     = new SeleniumGeneratorOptions();
            var myGenerator = new MySeleniumGeneratorTestClass();

            // do
            options.AddCustomGenerator(myGenerator);

            // assert
            var foundGenerator = options.GetCustomGenerators().FirstOrDefault(b => b.Equals(myGenerator));

            if (foundGenerator != null)
            {
                Assert.AreEqual(myGenerator, foundGenerator);
            }
            else
            {
                Assert.Fail();
            }
        }