Ejemplo n.º 1
0
        public void Constructor_PassingAlphabeticCharacter_ExpectedVariableAssignedAndObjectConstructed()
        {
            // Arrange
            Quantifier quantifier = GetQuantifier();

            // Act
            char actualBoundVariable = quantifier.GetBoundVariable();

            // Assert
            actualBoundVariable.Should().Be(GetBoundVariable(), "Because the character should be assigned");
        }
Ejemplo n.º 2
0
        public void ToPrefixString_SucessorAssigned_ExpectedPrefixStringReturned()
        {
            // Arrange
            Quantifier quantifier = GetQuantifier();

            quantifier.LeftSuccessor = new Proposition('P');

            // Act
            string actualToPrefixString = quantifier.ToPrefixString();

            string expectedToPrefixString = $"{quantifier.Data}{quantifier.GetBoundVariable()}.(P)";

            // Assert
            actualToPrefixString.Should().Be(expectedToPrefixString, "Because that's the prefix format for the quantifier");
        }