public void TestForValue() { MockGenerator gen = new MockGenerator(5); Assert.AreEqual(gen.Generate(10), "kjiwq7e8vd"); }
public void Delete_Foreign_Key_Should_Throw_Exception_If_Table_Name_Is_Null() { // Setup empty FK var deleteFKExpression = new DeleteForeignKeyExpression(); var fkDef = new ForeignKeyDefinition(); deleteFKExpression.ForeignKey = fkDef; // Setup empty mock object var mockGenerator = new MockGenerator(null, null, null); Assert.Throws<ArgumentNullException>(() => mockGenerator.Generate(deleteFKExpression)); }
public void Delete_Foreign_Key_Should_Throw_Exception_If_Table_Name_Is_Null() { // Setup empty FK var deleteFKExpression = new DeleteForeignKeyExpression(); var fkDef = new ForeignKeyDefinition(); deleteFKExpression.ForeignKey = fkDef; // Setup empty mock object var mockGenerator = new MockGenerator(null, null); Assert.Throws <ArgumentNullException>(() => mockGenerator.Generate(deleteFKExpression)); }