Ejemplo n.º 1
0
        public void PingServiceAvailable()
        {
            service.Switch = DataSwitch.Updated;
            var response = controller.Ping();

            Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
        }
Ejemplo n.º 2
0
        public void PingReturnsOkObjectResult()
        {
            var controller = new PingController();

            var result = controller.Ping();

            Assert.IsType <OkObjectResult>(result);
        }
Ejemplo n.º 3
0
        public void PingReturnsPong()
        {
            var controller = new PingController();

            var result = (OkObjectResult)controller.Ping();

            Assert.Equal("pong", result.Value);
        }
        public void Ping_returns_Pong()
        {
            var expectedResponse = "Pong";

            var result = _controller.Ping() as OkObjectResult;

            Assert.That(result, Is.Not.Null);
            Assert.That(result.Value, Is.EqualTo(expectedResponse));
        }
Ejemplo n.º 5
0
        public void GetReturnsPong()
        {
            var returnValue = myContorller.Ping();

            Assert.Equal("pong", returnValue.ToString());
        }