Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.Anchor.addStyleName()


        FlowPanel panel = new FlowPanel();

        for (Map.Entry<String, String> entry : docInfo.getDownloadExtensions()
                .entrySet()) {
            Anchor anchor = new Anchor(entry.getKey());
            anchor.addStyleName("l--push-right-half");
            anchor.setTitle(messages.downloadFileTitle(entry.getKey()));
            anchor.setHref(Application.getFileDownloadURL(userWorkspaceContext
                    .getWorkspaceContext().getWorkspaceId(), entry.getValue()));
            anchor.setTarget("_blank");
            panel.add(anchor);
View Full Code Here


   @Test
   public void hasStyle() {
      // Arrange
      Anchor a = new Anchor();
      a.setStyleName("first-style");
      a.addStyleName("second-style");
      a.addStyleName("third-style");

      // Act
      try {
         assertThat(a).hasStyle("first-style", "second-style", "third-style");
View Full Code Here

   public void hasStyle() {
      // Arrange
      Anchor a = new Anchor();
      a.setStyleName("first-style");
      a.addStyleName("second-style");
      a.addStyleName("third-style");

      // Act
      try {
         assertThat(a).hasStyle("first-style", "second-style", "third-style");
      } catch (AssertionError e) {
View Full Code Here

   @Test
   public void hasStyleAssertionErrorMessage() {
      // Arrange
      Anchor a = new Anchor();
      a.setStyleName("first-style");
      a.addStyleName("second-style");
      a.addStyleName("third-style");

      // Act
      try {
         assertThat(a).hasStyle("first-style", "second-style", "thrid-style", "fourth-style");
View Full Code Here

   public void hasStyleAssertionErrorMessage() {
      // Arrange
      Anchor a = new Anchor();
      a.setStyleName("first-style");
      a.addStyleName("second-style");
      a.addStyleName("third-style");

      // Act
      try {
         assertThat(a).hasStyle("first-style", "second-style", "thrid-style", "fourth-style");
         fail("AssertionError should be thrown");
View Full Code Here

   @Test
   public void styleNameEquals() {
      // Arrange
      Anchor a = new Anchor();
      a.setStyleName("first");
      a.addStyleName("second");

      // Act
      try {
         assertThat(a).styleNameEquals("first second");
      } catch (AssertionError e) {
View Full Code Here

   @Test
   public void styleNameEqualsAssertionErrorMessage() {
      // Arrange
      Anchor a = new Anchor();
      a.setStyleName("first");
      a.addStyleName("second");

      // Act
      try {
         assertThat(a).styleNameEquals("not-my-style");
         fail("AssertionError should be thrown");
View Full Code Here

   @Test
   public void styleNameEqualsWithAsAndCustomAssertionErrorMessage() {
      // Arrange
      Anchor a = new Anchor();
      a.setStyleName("first");
      a.addStyleName("second");

      // Act
      try {
         assertThat(a).as("my anchor").overridingErrorMessage("custom error message").styleNameEquals(
                  "not-my-style");
View Full Code Here

   @Test
   public void styleNameEqualsWithAsAssertionErrorMessage() {
      // Arrange
      Anchor a = new Anchor();
      a.setStyleName("first");
      a.addStyleName("second");

      // Act
      try {
         assertThat(a).as("my anchor").styleNameEquals("not-my-style");
         fail("AssertionError should be thrown");
View Full Code Here

   @Test
   public void styleNameEqualsWithCustomAssertionErrorMessage() {
      // Arrange
      Anchor a = new Anchor();
      a.setStyleName("first");
      a.addStyleName("second");

      // Act
      try {
         assertThat(a).overridingErrorMessage("custom error message").styleNameEquals(
                  "not-my-style");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.