public void Asserts_Equal() { // Arrange var value = Rnd.Str; // Act var action = () => FluentQueryHelper.AssertEqualType(value, value); // Assert action(); }
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); }
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); }