Exemplo n.º 1
0
 public void ThrowsExceptionIfClassIsMissingClassName()
 {
     classUnderTest.LoadTokens(t1, t3, t4);
     classUnderTest
     .Invoking(c => c.ParseClass())
     .Should().Throw <ApplicationException>()
     .WithMessage("class expected a className identifier, got Symbol '{' instead");
 }
Exemplo n.º 2
0
 public void ThrowsExceptionIfClassVariableDefinitionTypeMissing()
 {
     classUnderTest.LoadTokens(cvd1);
     classUnderTest
     .Invoking(c => c.ParseClassVariableDeclaration())
     .Should().Throw <ApplicationException>()
     .WithMessage("class variable definition expected a type, reached end of file instead");
 }