예제 #1
0
        public void GetById()
        {
            // Arrange
            ListController controller = new ListController();

            // Act
            string result = controller.Get(5);

            // Assert
            Assert.AreEqual("value", result);
        }
예제 #2
0
        public void Get()
        {
            // Arrange
            ListController controller = new ListController();

            // Act
            IEnumerable <string> result = controller.Get();

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(2, result.Count());
            Assert.AreEqual("value1", result.ElementAt(0));
            Assert.AreEqual("value2", result.ElementAt(1));
        }
예제 #3
0
        public async void Get_Live_Currencies_Data()
        {
            var okResult = await _controller.Get();

            Assert.IsType <CurrencyListModel>(okResult.Value);
        }