Exemplo n.º 1
0
        public void ByteConstant_PostMutation_IsNot_240()
        {
            // Arrange
            var  binary   = DllTestHelper.CompileTestBinary(folder);
            byte expected = 240;

            // Act
            var mutatedBinary = DllTestHelper.MutateConstant <NumberConstantMutationAnalyzer>(binary, ConstantByteName);

            using (var binaryInteractor = new DllTestHelper(mutatedBinary))
            {
                var actual = binaryInteractor.GetField(nameSpace, ConstantByteName);

                // Assert
                Assert.AreNotEqual(expected, actual);
            }
        }
Exemplo n.º 2
0
        public void StringConstantTwoCharacters_PostMutation_IsNot_AB()
        {
            // Arrange
            var binary   = DllTestHelper.CompileTestBinary(folder);
            var expected = "AB";

            // Act
            var mutatedBinary =
                DllTestHelper.MutateConstant <StringConstantMutationAnalyzer>(binary, ConstantStringTwoCharactersName);

            using (var binaryInteractor = new DllTestHelper(mutatedBinary))
            {
                var actual = binaryInteractor.GetField(nameSpace, ConstantStringTwoCharactersName);

                // Assert
                Assert.AreNotEqual(expected, actual);
            }
        }