Examples of PotentialAssignment


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

Examples of org.junit.experimental.theories.PotentialAssignment

    @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

Examples of org.junit.experimental.theories.PotentialAssignment

            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

Examples of org.junit.experimental.theories.PotentialAssignment

    }

    @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
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.