public void Can_Add_Catalog_To_DataSource() { // Arrange var oldRenders = _renderMan.GetEntities().Count(); var catalog = new NoteCatalog { Name = "Test Catalog", Render = _render, Schema = "test schema" }; // Act var newCatalog = _manager.Create(catalog); var newRender = _renderMan.GetEntities().FirstOrDefault(r => r.Name == _render.Name); var renders = _renderMan.GetEntities().Count(); // Assert Assert.True(_manager.ProcessResult.Success); Assert.NotNull(newCatalog); Assert.NotNull(newRender); Assert.Equal(oldRenders + 1, renders); Assert.True(newCatalog.Id >= 1, "newNote.Id >=1"); Assert.Equal("Test Catalog", newCatalog.Name); Assert.NotNull(newCatalog.Render); }
public void Can_Search_Render_By_Id() { // Arrange var render = new NoteRender { Name = "Test Render", Namespace = "Default NameSpace" }; var newRender = _manager.Create(render); // Act var savedRender = _manager.GetEntities().FirstOrDefault(c => c.Id == newRender.Id); // Assert Assert.True(_manager.ProcessResult.Success); Assert.NotNull(savedRender); Assert.Equal(savedRender.Name, render.Name); }