public void StaticCreateCreatesWithDefaultTypeIfTypeIsNotSpecified() { var result = DbDescription.Create(DbDescriptions.ImplicitDbDescriptionType); Assert.That(result, Is.Not.Null); Assert.That(result, Is.AssignableTo <IDbDescription>()); Assert.That(result, Is.InstanceOf <DbDescription>()); Assert.That(result.ConnectionInfo.ConnectionString, Is.EqualTo("server=server")); }
public void StaticCreateCreatesDbDescription() { var result = DbDescription.Create(DbDescriptions.ExplicitDbDescriptionType); Assert.That(result, Is.Not.Null); Assert.That(result, Is.AssignableTo <IDbDescription>()); Assert.That(result, Is.InstanceOf <TestDbDescription>()); Assert.That(result.ConnectionInfo.ConnectionString, Is.EqualTo("server=server")); }
public void StaticCreateThrowsIfTypeIsInvalid(string xmlRoot) { Assert.That(() => DbDescription.Create(xmlRoot), Throws.ArgumentException.With.Property("ParamName").EqualTo("xmlRoot")); }