Exemple #1
0
        public void GetWidgetName_should_get_widget_name()
        {
            var fakeWidget = _fixture.Create <Widget>();

            _slowTestContext.Widgets.Add(fakeWidget);
            _slowTestContext.SaveChanges();

            var result = _widgetRepository.GetWidgetNameById(fakeWidget.Id);

            Assert.Equal(fakeWidget.Name, result);
        }
        public string GetWidgetName(int id)
        {
            var widgetName = _widgetRepository.GetWidgetNameById(id);

            return(widgetName);
        }