public void ViewModelsAssemblyMustNotTakeADependancyOn() { typeof(FeaturesAssembly).MustConformTo(Convention.MustNotTakeADependencyOn(typeof(AppAssembly), "TODO")); typeof(FeaturesAssembly).MustConformTo(Convention.MustNotTakeADependencyOn(typeof(ServicesConnectedAssembly), "TODO")); typeof(FeaturesAssembly).MustConformTo(Convention.MustNotTakeADependencyOn(typeof(ServicesDisconnectedAssembly), "TODO")); typeof(FeaturesAssembly).MustConformTo(Convention.MustNotTakeADependencyOn(typeof(TestsAssembly), "TODO")); }
public void MustNotTakeDirectDependencyOnDbContext() { typeof(DbContext).Assembly.GetExportedTypes() .MustConformTo(Convention.MustNotTakeADependencyOn(typeof(DbContext), "Because multithreading, transaction boundaries, testability etc.")) .WithFailureAssertion(Assert.Fail); }
public void MustNotTakeADependencyOnConventionSpecification_FailsIfTheIdentifiedConstructorParameterExists() { var result = typeof(HasIllegalDependencies) .MustConformTo(Convention.MustNotTakeADependencyOn(typeof(Dependency), "Because it shouldn't")); result.IsSatisfied.Should().BeFalse(); result.Failures.Should().HaveCount(1); }
public void MustNotTakeADependencyOnConventionSpecification_Success() { typeof(HasNoIllegalDependencies) .MustConformTo(Convention.MustNotTakeADependencyOn(typeof(Dependency), "Because it shouldn't")) .IsSatisfied .Should() .BeTrue(); }
public void AppAssemblyMustNotTakeADependancyOn() { typeof(AppAssembly).MustConformTo(Convention.MustNotTakeADependencyOn(typeof(FeaturesAssembly), "TODO")); typeof(AppAssembly).MustConformTo(Convention.MustNotTakeADependencyOn(typeof(TestsAssembly), "TODO")); }