<commit_before>﻿using NUnit.Framework;

namespace ZimmerBot.Core.Tests.BotTests
{
  [TestFixture]
  public class RepeatableTests : TestHelper
  {
    [Test]
    public void NormalyOutputDoesNotRepeat()
    {
      BuildBot(@"
> help
: It is okay

> Help
! weight 0.999
: It is done
");
      AssertDialog("help", "It is okay");
      AssertDialog("help", "It is done");
    }


    [Test]
    public void CanMarkRuleAsRepeatable()<commit_msg>Verify patterns are not repeatable.<commit_after>﻿using NUnit.Framework;

namespace ZimmerBot.Core.Tests.BotTests
{
  [TestFixture]
  public class RepeatableTests : TestHelper
  {
    [Test]
    public void NormalyOutputDoesNotRepeat()
    {
      BuildBot(@"
> help
: It is okay

> Help
! weight 0.999
: It is done
");
      AssertDialog("help", "It is okay");
      AssertDialog("help", "It is done");
    }


    [Test]
    public void NormalyOutputDoesNotRepeat_ForPatterns()
    {
      BuildBot(@"
! pattern (intent = help)
{
  > help
}

>> help
: It is okay

>> Help
! weight 0.999
: It is done
");
      AssertDialog("help", "It is okay");
      AssertDialog("help", "It is done");
    }


    [Test]
    public void CanMarkRuleAsRepeatable()
{'fraction_non_alphanumeric': 0.12416107382550336, 'fraction_numerical': 0.010067114093959731, 'mean_word_length': 3.0716723549488054, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2643848', 'n_tokens_mistral': 412, 'n_tokens_neox': 392, 'n_words': 102}