public void ExtractData_UsesCommentName() { var reader = new ApplicationBehaviourReader(); var applicationBehaviour = reader.ExtractData(FileText); applicationBehaviour.Name.ShouldBe("HelloWorld"); }
public void ExtractData_UsesCommentDescription() { var reader = new ApplicationBehaviourReader(); var applicationBehaviour = reader.ExtractData(FileText); applicationBehaviour.Description.ShouldBe($"Send a message:{Environment.NewLine}Hello World!"); }
public void ExtractData_NamespaceMatch() { var reader = new ApplicationBehaviourReader(); var entity = reader.ExtractData(FileText); entity.Namespace.ShouldBe("Omnia.Behaviours.T99.Internal.System"); }
public void ExtractData_SuccessfullyExtractUsings() { var reader = new ApplicationBehaviourReader(); var entity = reader.ExtractData(FileText); entity.Usings.ShouldNotBeNull(); entity.Usings.Count.ShouldBe(1); entity.Usings.Single().ShouldBe("MyCompany.CustomDll"); }
public void ExtractData_ValidExpression() { var reader = new ApplicationBehaviourReader(); var expression = reader.ExtractData(FileText).Expression; expression.ShouldBe(@"if(context == null) { throw new Exception(""Missing context""); } return new Dictionary<string, object>() { { ""GreetingMessage"", ""Hello World!"" } };"); }