public void Resolve_NullConstant_Null()
        {
            var children = Enumerable.Empty<ISyntacticNode>();
            var linkedClass = MockRepository.GenerateStub<ILinkedLibrary>();
            var term = new ConstantDeclarationTerm("Pi");
            linkedClass.Stub(lc => lc.FindConstant(term)).Return(null);
            

            var resolver = new ConstantResolver();
            var resolvedTerm = resolver.Resolve(term, children, linkedClass);

            Assert.That(resolvedTerm, Is.Null);
        }
예제 #2
0
 public void Resolve_InappropriateTermType_True()
 {
     var resolverType = new ResolverType<FunctionDeclarationTerm>();
     var term = new ConstantDeclarationTerm("variable");
     Assert.That(resolverType.Resolve(term), Is.False);
 }
 public void Variable_SomeValue_Equal()
 {
     const string variable = "myconst";
     var term = new ConstantDeclarationTerm(variable);
     Assert.That(term.Identifier, Is.EqualTo(variable));
 }