public void LoadSingleDocument() { var widget = new Widget() { Description = "A widget", Expiration = DateTime.Now.AddYears(1), Name = "Widget", Price = 9.99m, Size = 2 }; _dbVerifier.Insert(widget); var widgets = new MongoyList <Widget>(Host, Database, Collection); Assert.Equal(1, widgets.Count); var found = widgets.First(); Assert.Equal(widget.Description, found.Description); Assert.Equal(widget.Expiration.Year, found.Expiration.Year); Assert.Equal(widget.Name, found.Name); Assert.Equal(widget.Price, found.Price); Assert.Equal(widget.Size, found.Size); }
public void LoadSingleDocument() { var widget = new Widget() { Description = "A widget", Expiration = DateTime.Now.AddYears(1), Name = "Widget", Price = 9.99m, Size = 2 }; _dbVerifier.Insert(widget); var widgets = new MongoyList<Widget>(Host, Database, Collection); Assert.Equal(1, widgets.Count); var found = widgets.First(); Assert.Equal(widget.Description, found.Description); Assert.Equal(widget.Expiration.Year, found.Expiration.Year); Assert.Equal(widget.Name, found.Name); Assert.Equal(widget.Price, found.Price); Assert.Equal(widget.Size, found.Size); }