コード例 #1
0
        public void Delete()
        {
            // Arrange
            DemoController controller = new DemoController();

            // Act
            controller.Delete(5);
            // Assert
        }
コード例 #2
0
        public void Put()
        {
            // Arrange
            DemoController controller = new DemoController();

            // Act
            controller.Put(5, "value");

            // Assert
        }
コード例 #3
0
        public void GetById()
        {
            // Arrange
            DemoController controller = new DemoController();

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

            // Assert
            Assert.AreEqual("value", result);
        }
コード例 #4
0
        public void Post()
        {
            // Arrange
            DemoController controller = new DemoController();

            // Act
            controller.Factors(new Models.DemoInputModel()
            {
                 Count = 4, InputString = "hi"
            });

            // Assert
        }
コード例 #5
0
        public void Get()
        {
            // Arrange
            DemoController controller = new DemoController();

            // 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));
        }