<commit_before>﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using TAIO.PSO;
using TAIO.Automata;

namespace Tests
{
    [TestClass]
    public class AutomatonTests
    {
        /// <summary>
        /// Testing constructing automaton
        /// </summary>
        [TestMethod]
        public void AutomatonConstructionFromPositionObjectTest()
        {
            // Arrange
            Position position = new Position(2, 3, 0) { OnePositions = new[,] { { 1, 2, 1 }, { 2, 2, 1 } } };

            // Act
            Automaton automaton = new Automaton(position);

            // Assert
            Assert.AreEqual(automaton.GetFinalState("101"), 2);
        }

        [TestMethod()]
        public void AutomatonTest()
        {
            Assert.Fail();
        }

        [TestMethod()]
        public void AutomatonTest1()
        {
            Assert.Fail();
        }

        [TestMethod()]
        public void GetFinalStateTest()
        {
            string testingWord = "0101";<commit_msg>* testing get final state for automaton<commit_after>﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using TAIO.PSO;
using TAIO.Automata;

namespace Tests
{
    [TestClass]
    public class AutomatonTests
    {
        /// <summary>
        /// Testing constructing automaton
        /// </summary>
        [TestMethod]
        public void AutomatonConstructionFromPositionObjectTest()
        {
            // Arrange
            Position position = new Position(2, 3, 0) { OnePositions = new[,] { { 1, 2, 1 }, { 2, 2, 1 } } };

            // Act
            Automaton automaton = new Automaton(position);

            // Assert
            Assert.AreEqual(automaton.GetFinalState("101"), 2);
        }

        [TestMethod()]
        public void GetFinalStateTest()
        {
            string testingWord = "0101";
{'fraction_non_alphanumeric': 0.1115949918345128, 'fraction_numerical': 0.01905280348394121, 'mean_word_length': 1.7639097744360903, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4296794', 'n_tokens_mistral': 535, 'n_tokens_neox': 488, 'n_words': 117}