예제 #1
0
        public void GeneratePropositionByRandomChoice_PositiveIntegerGiven_ExpectedCorrespondingObjectReturned(int choice, Type type)
        {
            // Arrange
            PropositionGenerator propositionGenerator = new PropositionGenerator();

            // Act
            Proposition generatedProposition = propositionGenerator.GeneratePropositionByRandomChoice(choice);

            // Assert
            generatedProposition.GetType().Should().Be(type, "Because based on that generated integer a specific proposition should be returned");
        }
예제 #2
0
        public void GeneratePropositionByRandomChoice_IntegerForConstantGiven_ExpectedConstantReturned()
        {
            // Arrange
            PropositionGenerator propositionGenerator = new PropositionGenerator();

            // Act
            int         constantChoice       = 6;
            Proposition generatedProposition = propositionGenerator.GeneratePropositionByRandomChoice(constantChoice);

            // Assert
            (generatedProposition is Constant).Should().BeTrue("Because based on that integer one of the constants should be returned.");
        }