Esempio n. 1
0
        public async void URLUnitTest_GetByID()
        {
            //arrange
            InMemoryURLData auxData  = new InMemoryURLData();
            var             _mockURL = new URLController(auxData);


            //act
            string auxString = "algo";
            URL    temp      = await _mockURL.Get(auxString);

            //assert
            Assert.Equal("https://google.com", temp.URLValue);
        }
Esempio n. 2
0
        public async Task URLUnitTest_InsertURLAsync()
        {
            //arrange
            InMemoryURLData auxData  = new InMemoryURLData();
            var             _mockURL = new URLController(auxData);

            //Act
            URL temp = new URL {
                Id = "nuevo", URLValue = "https://github.com"
            };

            auxData.Insert(temp.Id, temp);
            temp = await _mockURL.Get(temp.Id);

            //assert
            Assert.Equal(temp.URLValue, temp.URLValue);
        }