Exemple #1
0
        public void Verify_Method_Return_Expected_MoqAnswer()
        {
            IResolverSearchEngine program = mock.Object;
            var response = program.SearchEngineResultInString(new string[] { "java", ".net" });

            Assert.AreEqual("YOLO", response);
        }
Exemple #2
0
        public void Verify_Method_Dont_Return_Empty_Answer()
        {
            IResolverSearchEngine program = mock.Object;
            var response = program.SearchEngineResultInString(new string[] { "java", ".net" });

            Assert.AreNotEqual("", response);
        }
Exemple #3
0
        public void Verify_Method_Dont_Return_Exception_When_Arguments_Is_Correct()
        {
            IResolverSearchEngine program = mock.Object;

            Assert.DoesNotThrow(() => program.SearchEngineResultInString(new string[] { "java", ".net", "javascript" }));
        }
Exemple #4
0
        public void Verify_Method_Return_Exception_If_Arguments_Is_Correct()
        {
            IResolverSearchEngine program = mock.Object;

            Assert.Throws <ArgumentException>(() => program.SearchEngineResultInString(new string[] { "java" }));
        }