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

        // Act
        var action = () => FluentQueryHelper.AssertEqualType(value, value);

        // Assert
        action();
    }
Exemplo n.º 2
0
    public void Incorrect_Type__Throws_EqualTypeException()
    {
        // Arrange
        var value = Rnd.Lng;

        // Act
        var action = () => FluentQueryHelper.AssertEqualType(value, value.ToString());

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

        Assert.Equal($"Expected type '{typeof(long)}' but value was type '{typeof(string)}'.", ex.Message);
    }
Exemplo n.º 3
0
    public void Not_Equal__Throws_EqualTypeException()
    {
        // Arrange
        var v0 = Rnd.Str;
        var v1 = Rnd.Str;

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

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

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