public void Gets_WhenCalled_ReturnsObjects() { // Arrange var s = new SchoolRepo(_context); // Act var okResult = s.SelectAll(); // Assert Assert.IsAssignableFrom <IEnumerable <School> >(okResult); }
public void Gets_WhenCalled_ReturnNull() { // Arrange var s = new SchoolRepo(_context); // Act var okResult = s.SelectOne(11); // Assert Assert.Null(okResult); }
public void Delete_WhenCalled_ReturnFalseResult() { // Arrange var s = new SchoolRepo(_context); // Act var okResult = s.DeleteOne(15); // Assert Assert.False(okResult); }
public void Update_WhenCalled_ReturnTrueResult() { // Arrange var s = new SchoolRepo(_context); // Act var okResult = s.UpdateOne(new ProjectTest.Models.ViewModels.SchoolUpdateModel() { Name = "school for test" }, 10); // Assert Assert.True(okResult); }
public void Insert_WhenCalled_ReturnTrueResult() { // Arrange var s = new SchoolRepo(_context); // Act var okResult = s.Insert(new ProjectTest.Models.ViewModels.SchoolInsertModel() { Name = "school for test" }); // Assert Assert.True(okResult); }