private void GenerateCode() { if (_lastPageObject == null) { return; } Code = _codeService.GeneratePageObject(_lastPageObject.Name, _lastPageObject.Namespace, _lastPageObject.UiObjectInfos, UseAttribute); }
public void GeneratePageObject_WhenHavingUiObjectWithOneAttribueAndShouldGenerateWithAttributes_ShouldGenerateCorrectAssignStatement() { var pageObjectInfo = new UiObjectInfo { Name = "myObject", Node = new Node(new XElement("node", new XAttribute("class", "myClass")), null), FindWith = new List <AttributeTags> { AttributeTags.Class, } }; var code = _codeService.GeneratePageObject("test", "test", new List <UiObjectInfo> { pageObjectInfo }, true); Assert.IsTrue(code.Contains("[Create(with: AttributeTags.Class, value: \"myClass\")]")); }