public void In_memory_DbSet_can_be_used_for_Add() { var set = new InMemoryNonGenericDbSet <Product>(); var product = new Product(); Assert.Same(product, set.Add(product)); Assert.Same(product, set.ToList <Product>().Single()); }
public void In_memory_DbSet_can_be_used_for_Remove() { var set = new InMemoryNonGenericDbSet <Product>(); var product = new Product(); set.Add(product); Assert.Same(product, set.Remove(product)); Assert.Empty(set); }