Exemplo n.º 1
0
    public void Asserts_Equal()
    {
        // Arrange
        var value = Rnd.Str;
        var v0    = new { value };
        var v1    = new { value };

        // Act
        var action = () => FluentQueryHelper.AssertEqualJson(v0, v1);

        // Assert
        action();
    }
Exemplo n.º 2
0
    public void Same_Property_Names__Different_Values__Throws_EqualJsonException()
    {
        // Arrange
        var v0 = new { v0 = Rnd.Str };
        var v1 = new { v1 = Rnd.Str };

        // Act
        var action = () => FluentQueryHelper.AssertEqualJson(v0, v1);

        // Assert
        var ex = Assert.Throws <EqualJsonException>(action);

        Assert.Equal($"Expected '{v0}' but value was '{v1}'.", ex.Message);
    }