public void GetColumnsWhenEmpty() { var task = Controller.GetColumns(); var resultValue = task.Result.Value; Assert.IsNotNull(task); Assert.IsNotNull(resultValue); Assert.IsInstanceOfType(task, typeof(Task <ActionResult <List <Column> > >)); Assert.AreEqual(MockColumnService.GetMockDb(), resultValue); Assert.IsTrue(resultValue.Count == 0); }
public void GetColumnsWithData() { var columnsList = new List <Column> { new Column(1, "Column1"), new Column(2, "Column1"), new Column(3, "Column1"), }; MockColumnService.AddColumnsToMockDb(columnsList); var task = Controller.GetColumns(); var resultValue = task.Result.Value; Assert.IsNotNull(task); Assert.IsNotNull(resultValue); Assert.IsInstanceOfType(task, typeof(Task <ActionResult <List <Column> > >)); Assert.AreEqual(MockColumnService.GetMockDb(), resultValue); }