public void CheckReferencedEntityCreation() { var ts = new TestScenario("tmp", null); var someMovie = ts.GetEntity <Entites.Movie>(); Assert.True(someMovie.Lead != null); }
public void CheckListCreation() { var ts = new TestScenario("tmp", null); var someMovie = ts.GetEntity <Entites.Movie>(); Assert.True(someMovie.Actors.Count > 0); }
public void CheckDateRangeAttribute() { var ts = new TestScenario("tmp", null); var someMovie = ts.GetEntity <Entites.Movie>(); Assert.True(someMovie.ReleaseDate.Year == 2000); }
public void CreatesEntitiesWithFieldValues() { var ts = new TestScenario("tmp", null); var someMovie = ts.GetEntity <Entites.Movie>(); Assert.True(someMovie.Title != null); }
public void CheckExporterLoad() { InMemoryExporter exporter = new InMemoryExporter(); var ts = new TestScenario("test", exporter); var someMovie = ts.GetEntity <Entites.Movie>(); Assert.Equal("Back to the Future", someMovie.Title); }
public void CheckExporterSave() { InMemoryExporter exporter = new InMemoryExporter(); var ts = new TestScenario("test", exporter); var someMovie = ts.GetEntity <Entites.Movie>(); someMovie.Title = "Back to the Future"; exporter.Save(); Assert.True(!exporter.IsNew); }
static void Main(string[] args) { // Initialize exporter (For testing. Exporters should be constructed by DI-frameworks.) JsonExporter exporter = new JsonExporter(); // Create a new TestScenario instance var scenario = new TestScenario("hello_world2", exporter); // Create a random entity on-the-fly var someMovie = scenario.GetEntity <Entites.Movie>(); Console.WriteLine(Utils.DebugUtility.EntityToString(someMovie)); //scenario.Save(); }