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