public void IsViolated_EmptyExpectedSymbolUnknown_ReturnsFalse() { var expectedFragment = Fragment.CreateEmpty(); IPreCondition preCondition = new CustomInferencePreCondition(c_symbol, expectedFragment, _problemMetadata); var context = new SymbolTable(_blacklistManager); Assert.That(preCondition.IsViolated(context), Is.False); }
public void IsViolated_NamedExpectedNamedGiven_ReturnsFalse() { var expectedFragment = Fragment.CreateNamed(c_expectedType); IPreCondition preCondition = new CustomInferencePreCondition(c_symbol, expectedFragment, _problemMetadata); var context = new SymbolTable(_blacklistManager); context.MakeSafe(c_symbol, expectedFragment); Assert.That(preCondition.IsViolated(context), Is.False); }
public void IsViolated_LiteralExpectedEmptyGiven_ReturnsTrue() { var expectedFragment = Fragment.CreateLiteral(); var givenFragment = Fragment.CreateEmpty(); IPreCondition preCondition = new CustomInferencePreCondition(c_symbol, expectedFragment, _problemMetadata); var context = new SymbolTable(_blacklistManager); context.MakeSafe(c_symbol, givenFragment); Assert.That(preCondition.IsViolated(context), Is.True); }