Ejemplo n.º 1
0
        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"));
        }
Ejemplo n.º 2
0
        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"));
        }
Ejemplo n.º 3
0
 public void StaticCreateThrowsIfTypeIsInvalid(string xmlRoot)
 {
     Assert.That(() => DbDescription.Create(xmlRoot), Throws.ArgumentException.With.Property("ParamName").EqualTo("xmlRoot"));
 }