public void Type_name_should_be_unique_key() { // arrange var injection = new TestEntityValidationInjection(); // act + assert Assert.That(injection.UniqueKey, Is.EqualTo("TestEntityValidationInjection")); }
public void EntityValidation_should_be_injectable() { // arrange var injection = new TestEntityValidationInjection(); var injectionSet = new InjectionSet(injection, new TestModelCreationInjection()); var factory = new DbContextFactory(); // act using (var context = Create(factory, injectionSet)) { context.ActionTypes.Add(new ActionType()); context.GetValidationErrors(); } // assert Assert.That(injection.Entries.Count, Is.EqualTo(1)); }