Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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" }));
        }
Ejemplo n.º 4
0
        public void Verify_Method_Return_Exception_If_Arguments_Is_Correct()
        {
            IResolverSearchEngine program = mock.Object;

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