Package org.junit.experimental.theories

Examples of org.junit.experimental.theories.PotentialAssignment


            public String toString() {
                return "string value";
            }
        };

        PotentialAssignment assignment = PotentialAssignment.forValue(name, value);

        assertEquals("\"string value\" <from stringDatapoint>", assignment.getDescription());
    }
View Full Code Here


    @Test
    public void shouldNotUseQuotesForNullValueDescriptions() throws CouldNotGenerateValueException {
        String name = "nullDatapoint";
        Object value = null;

        PotentialAssignment assignment = PotentialAssignment.forValue(name, value);

        assertEquals("null <from nullDatapoint>", assignment.getDescription());
    }
View Full Code Here

            public String toString() {
                throw new RuntimeException("Oh no!");
            }
        };

        PotentialAssignment assignment = PotentialAssignment.forValue(name, value);

        assertEquals("[toString() threw RuntimeException: Oh no!] <from explodingValue>", assignment.getDescription());
    }
View Full Code Here

    }

    @Test
    public void shouldReturnGivenValue() throws CouldNotGenerateValueException {
        Object value = new Object();
        PotentialAssignment assignment = PotentialAssignment.forValue("name", value);
        assertEquals(value, assignment.getValue());
    }
View Full Code Here

TOP

Related Classes of org.junit.experimental.theories.PotentialAssignment

Copyright © 2018 www.massapicom. 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.