Package fit.testFxtr

Source Code of fit.testFxtr.HandleFixtureDoesNotExtendFixtureTest

// Copyright (C) 2003-2009 by Object Mentor, Inc. All rights reserved.
// Released under the terms of the CPL Common Public License version 1.0.
package fit.testFxtr;

import static org.junit.Assert.assertEquals;

import java.util.Arrays;
import java.util.List;

import org.apache.commons.lang.StringUtils;
import org.junit.Test;
import fit.Fixture;
import fit.Parse;

public class HandleFixtureDoesNotExtendFixtureTest {

  @Test
  public void testLearnHowBadFixtureClassIsHandled() throws Exception {
    List<String> tableLines = Arrays.asList(new String[]
      {"<table>",
        "    <tr>",
        "        <td>fit.testFxtr.WouldBeFixture</td>",
        "    </tr>",
        "</table>"});

    String tableText = StringUtils.join(tableLines, "\r\n");

    Parse tableForFaultyFixture = new Parse(tableText);

    new Fixture().doTables(tableForFaultyFixture);
    String fixtureClassCellText = tableForFaultyFixture.at(0, 0, 0).body;

    assertEquals("fit.testFxtr.WouldBeFixture<hr/> "
      + "<span class=\"fit_label\">"
      + "Class fit.testFxtr.WouldBeFixture is not a fixture." + "</span>",
      fixtureClassCellText);
  }

}
TOP

Related Classes of fit.testFxtr.HandleFixtureDoesNotExtendFixtureTest

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.