public void RepositoryTests_Update_Updates() { var answer = new Answer(); _repository.Update(answer); Assert.Equal(answer.ObjectState, ObjectState.Modified); // Check that count stayed the same var fake = new FakeAnswers(); Assert.Equal(_repository.Count(), fake.Count()); }
public void RepositoryTests_Insert_Inserts() { var answer = new Answer(); _repository.Insert(answer); Assert.Equal(answer.ObjectState, ObjectState.Added); // Check that one item was added var fake = new FakeAnswers(); Assert.Equal(_repository.Count(), fake.Count() + 1); }
public void RepositoryTests_Count_ReturnsCount() { var fake = new FakeAnswers(); Assert.Equal(_repository.Count(), fake.Count()); }
public void RepositoryTests_Queryable_ReturnsQueryable() { var fake = new FakeAnswers(); Assert.Equal(_repository.Queryable().Count(), fake.Count()); }
public void RepositoryTests_Active_ReturnsActive() { var fake = new FakeAnswers(); Assert.Equal(_repository.Active().Count(), fake.Count()); }
public void RepositoryTests_List_ReturnsDataset() { var fake = new FakeAnswers(); Assert.Equal(_repository.List().Count(), fake.Count()); }