Example #1
0
        public void GeneratedTest()
        {
            MenuItemTester ClickToCount = new MenuItemTester("Click To Count");

            ClickToCount.Click();
            Assert.AreEqual("1", label.Properties.Text);
        }
Example #2
0
        public void Minimal()
        {
            this.testCaseSwitch = TestCaseSwitch.Minimal;

            this.SaveTemplate();

            var domain = this.Repository.Domain;

            domain.Name = "MyDomain";
            domain.SendChangedEvent();

            this.Explorer.AddRepository(this.Repository);

            this.ExtendedView = true;

            this.TreeViewTester.SelectNode(this.ExtendedViewTemplatesNode);

            var addTemplate = new MenuItemTester(Constants.AddTemplate);

            addTemplate.Target.PerformClick();

            Assert.AreEqual(1, this.Repository.Templates.Length);
            var template = this.Repository.Templates[0];

            Assert.AreEqual("MyConfig", template.Name);
            Assert.AreEqual(domain, template.Domain);
        }
Example #3
0
        public void ContextMenuClick()
        {
            MenuItemTester myMenuItem = new MenuItemTester("Click To Count");

            myMenuItem.Click();
            Assert.AreEqual("1", label.Text);
        }
        public void Minimal()
        {
            this.testCaseSwitch = TestCaseSwitch.Minimal;

            this.Explorer.AddRepository(this.Repository);

            this.domain.SendChangedEvent();

            this.TreeViewTester.SelectNode(this.DomainNode);

            var addType = new MenuItemTester(Constants.AddObjectType);

            Assert.IsTrue(addType.Target.Visible);

            addType.Click();

            Assert.AreEqual(1, this.domain.CompositeObjectTypes.Length);
            var objectType = this.domain.CompositeObjectTypes[0];

            Assert.AreEqual("MyType", objectType.SingularName);

            Assert.AreEqual(1, DomainNode.Target.Nodes.Count);

            Assert.AreEqual("MyType", TypeNode.Target.Text);
            Assert.AreEqual(new ObjectTypeTag(this.Repository, objectType), TypeNode.Target.Tag);
        }
Example #5
0
        public void OpenRepository()
        {
            this.testCaseSwitch = TestCaseSwitch.OpenRepository;

            this.Explorer.RemoveRepository(this.Repository);

            var repositories = this.Explorer.Repositories;

            Assert.AreEqual(0, repositories.Length);

            this.TreeViewTester.SelectNode(this.RepositoriesNode);

            var openRepository = new MenuItemTester(Constants.OpenRepository);

            Assert.IsTrue(openRepository.Target.Visible);

            openRepository.Click();

            Assert.IsTrue(openRepository.Target.Visible);

            Assert.IsTrue(RepositoriesNode.Target.IsExpanded);

            repositories = this.Explorer.Repositories;
            Assert.AreEqual(1, repositories.Length);

            this.Repository = repositories[0];
            Assert.AreEqual(RepositoryDirectory.FullName, this.Repository.DirectoryInfo.FullName);
        }
        public void IncorrectName()
        {
            testCaseSwitch = TestCaseSwitch.IncorrectName;
            onShownCount   = 0;

            explorer.Repositories.Add(repository);

            TreeNodeTester repositoryNodeTester = treeViewTester.FindNode(Constants.RepositoryTreeNodeIndeces);

            repositoryNodeTester.Select();

            MenuItemTester addDomain = new MenuItemTester(Constants.ADD_DOMAIN);

            Assert.IsTrue(addDomain.Target.Enabled);
            Assert.IsTrue(addDomain.Target.Visible);

            addDomain.Click();

            Assert.AreEqual(0, repositoryNodeTester.TreeNode.Nodes.Count);
            Assert.AreEqual(0, repository.MetaDomains.Count);

            Assert.IsTrue(DomainsDirectory.Exists);
            Assert.AreEqual(0, DomainsDirectory.GetFiles().Length);
            Assert.AreEqual(0, TypesDirectory.GetFiles().Length);
            Assert.AreEqual(0, RelationsDirectory.GetFiles().Length);
        }
        public void Minimal()
        {
            testCaseSwitch = TestCaseSwitch.Minimal;

            explorer.Repositories.Add(repository);

            TreeNodeTester repositoryNodeTester = treeViewTester.FindNode(0, 0);

            repositoryNodeTester.Select();

            MenuItemTester addDomain = new MenuItemTester(Constants.ADD_DOMAIN);

            Assert.IsTrue(addDomain.Target.Enabled);
            Assert.IsTrue(addDomain.Target.Visible);

            addDomain.Click();

            Assert.AreEqual(1, repositoryNodeTester.TreeNode.Nodes.Count);
            Assert.AreEqual(1, repository.MetaDomains.Count);

            Assert.IsTrue(repositoryNodeTester.TreeNode.IsExpanded);

            MetaDomain metaDomain = repository.MetaDomains[0];

            Assert.AreEqual("MyDomain", metaDomain.Name);
        }
Example #8
0
        public void Minimal()
        {
            this.testCaseSwitch = TestCaseSwitch.Create;

            var repositoriesNodeTester = this.TreeViewTester.FindNode(0);

            repositoriesNodeTester.Select();

            var createRepository = new MenuItemTester(Constants.AddRepository);

            Assert.IsTrue(createRepository.Target.Visible);

            createRepository.Click();

            var repositories = this.Explorer.Repositories;

            Assert.AreEqual(1, repositories.Length);

            this.Repository = repositories[0];
            Assert.AreEqual(RepositoryDirectory.FullName, this.Repository.DirectoryInfo.FullName);

            Assert.AreEqual("MyDomain", this.Repository.Domain.Name);

            var duplicateRepository = new Repository(this.Repository.DirectoryInfo);

            Assert.AreEqual("MyDomain", duplicateRepository.Domain.Name);
        }
Example #9
0
        public void MenuItemClick()
        {
            ContextMenuTestForm form = new ContextMenuTestForm();

            form.Show();

            TestWriter writer = new TestWriter(form);

            Assert.Equal("", writer.Test);

            MenuItemTester menuItem = new MenuItemTester("Click To Count");

            menuItem.Click();

            Assert.Equal(
                @"[Fact]
public void Test()
{

	MenuItemTester ClickToCount = new MenuItemTester(""Click To Count"");

	ClickToCount.Click();

}",
                writer.Test);
        }
Example #10
0
        public void NotAmbiguousNameBecauseInTwoMenusButQualified()
        {
            //source control property of the menu item is not actually set on the menu item in the tester
            //so handlers that rely on this are currently broken.  I am not sure whether anyone will notice
            //this.
            MenuItemTester myMenuItem = new MenuItemTester("myCounterLabel.ContextMenu.Test 2.Not Ambiguous");

            myMenuItem.Click();
        }
Example #11
0
        public void AddSuperDomain()
        {
            this.testCaseSwitch = TestCaseSwitch.AddSuperDomain;

            var superDomainRepository = new Repository(this.SuperDomainDirectoryInfo, true);
            var superDomainDomain     = superDomainRepository.Domain;

            superDomainDomain.Name = "SuperDomain";

            var superDomainClass = superDomainDomain.AddDeclaredObjectType(Guid.NewGuid());

            superDomainClass.SingularName = "SuperDomainClass";
            superDomainClass.PluralName   = "SuperDomainClasses";

            var superDomainAbstractClass = superDomainDomain.AddDeclaredObjectType(Guid.NewGuid());

            superDomainAbstractClass.SingularName = "SuperDomainAbstractClass";
            superDomainAbstractClass.PluralName   = "SuperDomainAbstractClasses";

            superDomainDomain.Validate();
            Assert.IsTrue(superDomainDomain.IsValid);

            superDomainClass.SendChangedEvent();
            superDomainAbstractClass.SendChangedEvent();
            superDomainDomain.SendChangedEvent();

            this.Explorer.AddRepository(this.Repository);

            var domain = this.Repository.Domain;

            domain.Name = "MyDomain";
            domain.SendChangedEvent();

            this.ExtendedView = true;

            this.TreeViewTester.SelectNode(this.ExtendedViewSuperDomainsNode);

            var addSuperDomain = new MenuItemTester(Constants.AddSuperDomain);

            Assert.IsTrue(addSuperDomain.Target.Visible);

            addSuperDomain.Click();

            Assert.AreEqual(1, this.ExtendedViewSuperDomainsNode.Target.Nodes.Count);

            // TODO: remove to Constants
            var superDomainTester = this.TreeViewTester.FindNode(0, 0, 3);

            Assert.AreEqual("SuperDomain", superDomainTester.Target.Text);
            Assert.AreEqual(2, superDomainTester.Target.Nodes.Count);

            var superDomainAbstractClassNodeTester = superDomainTester[0];
            var superDomainClassNodeTester         = superDomainTester[1];

            Assert.AreEqual("SuperDomainAbstractClass", superDomainAbstractClassNodeTester.Target.Text);
            Assert.AreEqual("SuperDomainClass", superDomainClassNodeTester.Target.Text);
        }
Example #12
0
        public void DeleteRelation()
        {
            this.testCaseSwitch = TestCaseSwitch.DeleteRelation;

            this.Explorer.AddRepository(this.Repository);

            var domain = this.Repository.Domain;

            domain.Name = "MyDomain";

            var objectType = domain.AddDeclaredObjectType(Guid.NewGuid());

            objectType.SingularName = "Singular";
            objectType.PluralName   = "Plural";

            var relationType = domain.AddDeclaredRelationType(Guid.NewGuid(), Guid.NewGuid(), Guid.NewGuid());

            relationType.AssociationType.ObjectType = objectType;
            relationType.RoleType.ObjectType        = (ObjectType)domain.Domain.Find(UnitTypeIds.StringId);

            var relation2 = domain.AddDeclaredRelationType(Guid.NewGuid(), Guid.NewGuid(), Guid.NewGuid());

            relation2.AssociationType.ObjectType    = objectType;
            relation2.RoleType.ObjectType           = (ObjectType)domain.Domain.Find(UnitTypeIds.StringId);
            relation2.RoleType.AssignedSingularName = "AllorsString2";
            relation2.RoleType.AssignedPluralName   = "AllorsStrings2";
            relation2.RoleType.Size = -1;

            objectType.SendChangedEvent();
            relationType.SendChangedEvent();
            relation2.SendChangedEvent();
            domain.SendChangedEvent();

            TypeNode.Target.Expand();

            this.TreeViewTester.SelectNode(this.RelationNode);

            var deleteRelation = new MenuItemTester(Constants.Delete);

            Assert.IsTrue(deleteRelation.Target.Visible);

            Assert.AreEqual(2, domain.RelationTypes.Length);

            deleteRelation.Click();

            Assert.IsTrue(domain.IsValid);

            Assert.AreEqual(1, domain.RelationTypes.Length);

            Assert.AreEqual(2, TypeNode.Target.Nodes.Count);
        }
Example #13
0
        public void Generate()
        {
            this.testCaseSwitch = TestCaseSwitch.Generate;

            this.Explorer.AddRepository(this.Repository);

            this.ExtendedView = true;

            this.TreeViewTester.SelectNode(this.RepositoryNode);
            var generate = new MenuItemTester(Constants.Generate);

            Assert.IsTrue(generate.Target.Visible);

            generate.Click();
        }
        public void Maximal()
        {
            this.testCaseSwitch = TestCaseSwitch.Maximal;

            this.Explorer.AddRepository(this.Repository);

            var company = this.domain.AddDeclaredObjectType(Guid.NewGuid());

            company.SingularName = "Company";
            company.PluralName   = "Companies";

            var person = this.domain.AddDeclaredObjectType(Guid.NewGuid());

            person.SingularName = "Person";
            person.PluralName   = "Persons";

            company.SendChangedEvent();
            person.SendChangedEvent();
            this.domain.SendChangedEvent();

            this.TreeViewTester.SelectNode(TypeNode);

            var addRelation = new MenuItemTester(Constants.AddRelationType);

            Assert.IsTrue(addRelation.Target.Visible);

            addRelation.Click();

            Assert.AreEqual(1, this.domain.RelationTypes.Length);
            var relationType = this.domain.RelationTypes[0];

            Assert.AreEqual("EmployerEmployee", relationType.Name);
            Assert.IsTrue(relationType.AssociationType.IsOne);
            Assert.IsTrue(relationType.RoleType.IsMany);
            Assert.IsTrue(relationType.IsIndexed);

            this.TreeViewTester.Target.ExpandAll();

            Assert.AreEqual(1, TypeNode.FindByTagType(typeof(RelationTypeTag)).Length);

            Assert.AreEqual("Employees", RelationNode.Target.Text);
            Assert.AreEqual(new RelationTypeTag(this.Repository, relationType), this.RelationNode.Target.Tag);
        }
        public void IncorrectSingularName()
        {
            this.testCaseSwitch = TestCaseSwitch.IncorrectSingularName;

            this.Explorer.AddRepository(this.Repository);

            this.domain.SendChangedEvent();

            this.TreeViewTester.SelectNode(this.DomainNode);

            var addType = new MenuItemTester(Constants.AddObjectType);

            Assert.IsTrue(addType.Target.Visible);

            addType.Click();

            Assert.AreEqual(0, this.domain.CompositeObjectTypes.Length);

            Assert.AreEqual(0, DomainNode.Target.Nodes.Count);

            Assert.AreEqual(2, this.OnShownCount);
        }
Example #16
0
        public void InheritedTypeNoMenus()
        {
            this.testCaseSwitch = TestCaseSwitch.InheritedTypeNoMenus;

            this.Explorer.AddRepository(this.Repository);

            var domain = this.Repository.Domain;

            domain.Name = "MyDomain";

            var myInterface = domain.AddDeclaredObjectType(Guid.NewGuid());

            myInterface.SingularName = "MyInterface";
            myInterface.PluralName   = "MyInterfaces";
            myInterface.IsInterface  = true;

            var myClass = domain.AddDeclaredObjectType(Guid.NewGuid());

            myClass.SingularName = "MyClass";
            myClass.PluralName   = "MyClasses";

            myClass.AddDirectSupertype(myInterface);

            myInterface.SendChangedEvent();
            myClass.SendChangedEvent();
            domain.SendChangedEvent();

            SuperTypesNode.Target.ExpandAll();

            this.TreeViewTester.SelectNode(0, 0, 0, 0, 0, 0);

            var deleteType = new MenuItemTester(Constants.Delete);

            Assert.IsFalse(deleteType.Target.Visible);

            var addRelation = new MenuItemTester(Constants.AddRelationType);

            Assert.IsFalse(addRelation.Target.Visible);
        }
        public void MenuItemClick()
        {
            ContextMenuTestForm form = new ContextMenuTestForm();
            form.Show();

            TestWriter writer = new TestWriter(form);
            Assert.Equal("", writer.Test);

            MenuItemTester menuItem = new MenuItemTester("Click To Count");
            menuItem.Click();

            Assert.Equal(
                @"[Fact]
            public void Test()
            {

            MenuItemTester ClickToCount = new MenuItemTester(""Click To Count"");

            ClickToCount.Click();

            }",
                writer.Test);
        }
Example #18
0
        public void DeleteType()
        {
            this.testCaseSwitch = TestCaseSwitch.DeleteType;

            this.Explorer.AddRepository(this.Repository);

            var domain = this.Repository.Domain;

            domain.Name = "MyDomain";

            var objectType = domain.AddDeclaredObjectType(Guid.NewGuid());

            objectType.SingularName = "Singular";
            objectType.PluralName   = "Plural";

            var objectType2 = domain.AddDeclaredObjectType(Guid.NewGuid());

            objectType2.SingularName = "Singular2";
            objectType2.PluralName   = "Plural2";

            objectType.SendChangedEvent();
            objectType2.SendChangedEvent();
            domain.SendChangedEvent();

            this.TreeViewTester.SelectNode(this.TypeNode);

            var deleteType = new MenuItemTester(Constants.Delete);

            Assert.IsTrue(deleteType.Target.Visible);

            Assert.AreEqual(2, domain.CompositeObjectTypes.Length);

            deleteType.Click();

            Assert.AreEqual(1, domain.CompositeObjectTypes.Length);
            Assert.AreEqual(1, DomainNode.Target.Nodes.Count);
        }
Example #19
0
        public void DeleteSuperDomain()
        {
            this.testCaseSwitch = TestCaseSwitch.DeleteSuperDomain;

            var superDomainRepository = new Repository(this.SuperDomainDirectoryInfo, true);
            var superDomain           = superDomainRepository.Domain;

            superDomain.Name = "SuperDomain";
            superDomain.SendChangedEvent();

            var domain = this.Repository.Domain;

            domain.Name = "Domain";
            domain.SendChangedEvent();

            this.Explorer.AddRepository(this.Repository);

            this.Repository.AddSuper(this.SuperDomainDirectoryInfo);

            this.ExtendedView = true;

            this.ExtendedViewSuperDomainsNode.Target.Expand();

            this.TreeViewTester.SelectNode(0, 0, 0, 0);

            var delete = new MenuItemTester(Constants.Delete);

            Assert.IsTrue(delete.Target.Visible);

            Assert.AreEqual(2, domain.DirectSuperDomains.Length);

            delete.Click();

            domain = this.Repository.Domain;
            Assert.AreEqual(1, domain.DirectSuperDomains.Length);
        }
 public void GeneratedTest()
 {
     MenuItemTester ClickToCount = new MenuItemTester("Click To Count");
     ClickToCount.Click();
     Assert.Equal("1", label.Properties.Text);
 }
Example #21
0
 public void NoSuchControlFinder()
 {
     MenuItemTester myMenuItem = new MenuItemTester("junkData");
     myMenuItem.Click();
 }
Example #22
0
        public void DeleteTypeWithCascading()
        {
            this.testCaseSwitch = TestCaseSwitch.DeleteTypeWithCascading;

            this.Explorer.AddRepository(this.Repository);

            var domain = this.Repository.Domain;

            domain.Name = "MyDomain";

            var superType = domain.AddDeclaredObjectType(Guid.NewGuid());

            superType.SingularName = "Super";
            superType.PluralName   = "Supers";
            superType.IsInterface  = true;

            var objectType = domain.AddDeclaredObjectType(Guid.NewGuid());

            objectType.SingularName = "Singular";
            objectType.PluralName   = "Plural";
            objectType.AddDirectSupertype(superType);

            var objectType2 = domain.AddDeclaredObjectType(Guid.NewGuid());

            objectType2.SingularName = "Singular2";
            objectType2.PluralName   = "Plural2";

            var superRelationType = domain.AddDeclaredRelationType(Guid.NewGuid(), Guid.NewGuid(), Guid.NewGuid());

            superRelationType.AssociationType.ObjectType = superType;
            superRelationType.RoleType.ObjectType        = (ObjectType)domain.Domain.Find(UnitTypeIds.StringId);

            var relationType = domain.AddDeclaredRelationType(Guid.NewGuid(), Guid.NewGuid(), Guid.NewGuid());

            relationType.AssociationType.ObjectType = objectType;
            relationType.RoleType.ObjectType        = (ObjectType)domain.Domain.Find(UnitTypeIds.StringId);

            var relation2 = domain.AddDeclaredRelationType(Guid.NewGuid(), Guid.NewGuid(), Guid.NewGuid());

            relation2.AssociationType.ObjectType = objectType2;
            relation2.RoleType.ObjectType        = objectType;

            superType.SendChangedEvent();
            objectType.SendChangedEvent();
            objectType2.SendChangedEvent();
            superRelationType.SendChangedEvent();
            relationType.SendChangedEvent();
            relation2.SendChangedEvent();
            domain.SendChangedEvent();

            this.TreeViewTester.SelectNode(this.TypeNode);

            var deleteType = new MenuItemTester(Constants.Delete);

            Assert.IsTrue(deleteType.Target.Visible);

            Assert.AreEqual(3, domain.CompositeObjectTypes.Length);
            Assert.AreEqual(3, domain.RelationTypes.Length);

            deleteType.Click();

            Assert.AreEqual(2, domain.CompositeObjectTypes.Length);
            Assert.AreEqual(2, domain.RelationTypes.Length);

            Assert.AreEqual(2, DomainNode.Target.Nodes.Count);

            Assert.IsTrue(objectType.IsDeleted);
            Assert.IsFalse(objectType2.IsDeleted);

            Assert.IsFalse(superRelationType.IsDeleted);
            Assert.IsTrue(relationType.IsDeleted);
            Assert.IsFalse(relation2.RoleType.ExistObjectType);
        }
 public void NotAmbiguousNameBecauseInTwoMenusButQualified()
 {
     //source control property of the menu item is not actually set on the menu item in the tester
     //so handlers that rely on this are currently broken.  I am not sure whether anyone will notice
     //this.
     MenuItemTester myMenuItem = new MenuItemTester("myCounterLabel.ContextMenu.Test 2.Not Ambiguous");
     myMenuItem.Click();
 }
        public void NoSuchControlFinder()
        {
            MenuItemTester myMenuItem = new MenuItemTester("junkData");

            Assert.Throws <NoSuchControlException>(() => myMenuItem.Click());
        }
 public void AmbiguousNameBecauseInSubMenusButNotQualified()
 {
     MenuItemTester myMenuItem = new MenuItemTester("Not Ambiguous");
     Assert.Throws<AmbiguousNameException>(() => myMenuItem.Click());
 }
Example #26
0
 public void AmbiguousNameBecauseWeUseTextNotNameForMenuItems()
 {
     MenuItemTester myMenuItem = new MenuItemTester("Ambiguous");
     myMenuItem.Click();
 }
Example #27
0
 public void AmbiguousNameBecauseInSubMenusButNotQualified()
 {
     MenuItemTester myMenuItem = new MenuItemTester("Not Ambiguous");
     myMenuItem.Click();
 }
 public void AmbiguousNameBecauseInTwoMenus()
 {
     MenuItemTester myMenuItem = new MenuItemTester("Test 2.Not Ambiguous");
     Assert.Throws<AmbiguousNameException>(() => myMenuItem.Click());
 }
 public void AmbiguousNameBecauseWeUseTextNotNameForMenuItems()
 {
     MenuItemTester myMenuItem = new MenuItemTester("Ambiguous");
     Assert.Throws<AmbiguousNameException>(() => myMenuItem.Click());
 }
 public void ContextMenuClick()
 {
     MenuItemTester myMenuItem = new MenuItemTester("Click To Count");
     myMenuItem.Click();
     Assert.Equal("1", label.Text);
 }
Example #31
0
        public void UpdateTemplate()
        {
            this.testCaseSwitch = TestCaseSwitch.UpdateTemplate;

            this.Explorer.AddRepository(this.Repository);

            this.ExtendedView = true;

            var template = this.Repository.AddTemplate();

            template.Name = "MyGeneration";

            var templatesNodeTester = this.TreeViewTester.FindNode(0, 0, 1);

            templatesNodeTester.Target.ExpandAll();

            this.TreeViewTester.SelectNode(0, 0, 1, 0);
            var templateNodeTester = this.TreeViewTester.FindNode(0, 0, 1, 0);

            Assert.IsNotNull(templateNodeTester.Target);

            var updateTemplate = new MenuItemTester(Constants.UpdateTemplate);

            Assert.IsTrue(updateTemplate.Target.Visible);

            var templateFileInfo = SaveTemplate(
                "updated.stg",
                @"group AllorsTemplate;

TemplateId() ::= <<" + Guid.NewGuid() + @">>
TemplateName() ::= <<UpdatedTemplate>>
TemplateVersion() ::= <<1.0.1>>
TemplateAllors() ::= <<" + Domain.Version + @">>
TemplateConfiguration(domain) ::= <<
<generations/>
>>
");

            updateTemplate.Click();

            template.Source = new Uri(templateFileInfo.FullName);
            updateTemplate.Click();
            Assert.AreEqual("UpdatedTemplate", this.Repository.Templates[0].StringTemplate.Name);

            SaveTemplate(
                "updated.stg",
                @"group AllorsTemplate;

TemplateId() ::= <<" + Guid.NewGuid() + @">>
TemplateVersion() ::= <<1.0.1>>
TemplateAllors() ::= <<" + Domain.Version + @">>
TemplateConfiguration(domain) ::= <<
<generations/>
>>
");
            updateTemplate.Click();
            Assert.AreEqual("UpdatedTemplate", this.Repository.Templates[0].StringTemplate.Name);

            File.Delete(templateFileInfo.FullName);
            updateTemplate.Click();
            Assert.AreEqual("UpdatedTemplate", this.Repository.Templates[0].StringTemplate.Name);
        }
 public void DontNeedToSpecifyWhichForm()
 {
     MenuItemTester myMenuItem = new MenuItemTester("myCounterLabel.ContextMenu.Test 2.Not Ambiguous");
     myMenuItem.Click();
 }
 public void NoSuchControlFinder()
 {
     MenuItemTester myMenuItem = new MenuItemTester("junkData");
     Assert.Throws<NoSuchControlException>(() => myMenuItem.Click());
 }
 public void NotAmbiguousNameBecauseInSubMenus()
 {
     MenuItemTester myMenuItem = new MenuItemTester("Test 1.Not Ambiguous");
     myMenuItem.Click();
 }
Example #35
0
        public void AmbiguousNameBecauseInTwoMenus()
        {
            MenuItemTester myMenuItem = new MenuItemTester("Test 2.Not Ambiguous");

            myMenuItem.Click();
        }
Example #36
0
        public void NoSuchControlFinder()
        {
            MenuItemTester myMenuItem = new MenuItemTester("junkData");

            myMenuItem.Click();
        }
Example #37
0
        public void DontNeedToSpecifyWhichForm()
        {
            MenuItemTester myMenuItem = new MenuItemTester("myCounterLabel.ContextMenu.Test 2.Not Ambiguous");

            myMenuItem.Click();
        }
Example #38
0
        public void AmbiguousNameBecauseInSubMenusButNotQualified()
        {
            MenuItemTester myMenuItem = new MenuItemTester("Not Ambiguous");

            myMenuItem.Click();
        }
        public void AmbiguousNameBecauseInSubMenusButNotQualified()
        {
            MenuItemTester myMenuItem = new MenuItemTester("Not Ambiguous");

            Assert.Throws <AmbiguousNameException>(() => myMenuItem.Click());
        }
Example #40
0
 public void AmbiguousNameBecauseInTwoMenus()
 {
     MenuItemTester myMenuItem = new MenuItemTester("Test 2.Not Ambiguous");
     myMenuItem.Click();
 }
Example #41
0
        public void AmbiguousNameBecauseWeUseTextNotNameForMenuItems()
        {
            MenuItemTester myMenuItem = new MenuItemTester("Ambiguous");

            myMenuItem.Click();
        }
        public void AmbiguousNameBecauseInTwoMenus()
        {
            MenuItemTester myMenuItem = new MenuItemTester("Test 2.Not Ambiguous");

            Assert.Throws <AmbiguousNameException>(() => myMenuItem.Click());
        }
Example #43
0
        public void NotAmbiguousNameBecauseInSubMenus()
        {
            MenuItemTester myMenuItem = new MenuItemTester("Test 1.Not Ambiguous");

            myMenuItem.Click();
        }
        public void AmbiguousNameBecauseWeUseTextNotNameForMenuItems()
        {
            MenuItemTester myMenuItem = new MenuItemTester("Ambiguous");

            Assert.Throws <AmbiguousNameException>(() => myMenuItem.Click());
        }