public void MethodIsLeftAloneWhenMatchesNothing() { // currently fills var person = Angie.FastMake <Person>(); Assert.IsTrue(string.IsNullOrEmpty(person.GetMiddleName())); }
public void TwitterResourceTest() { var person = Angie.FastMake <Person>(); string emailFail = string.Format(Angie.Defaults.STRING_LOADFAIL, Angie.Defaults.FILE_DOMAIN_NAMES); Assert.AreNotEqual(string.Empty, person.EmailAddress, emailFail); }
public void DomainResourceTest() { var person = Angie.FastMake <Person>(); string twitterFail = string.Format(Angie.Defaults.STRING_LOADFAIL, Angie.Defaults.FILE_FIRST_NAMES); Assert.AreNotEqual(string.Empty, person.Twitter, twitterFail); }
public void WordsResourcesLoad() { var person = Angie.FastMake <Person>(); string wordFail = string.Format(Angie.Defaults.STRING_LOADFAIL, Angie.Defaults.FILE_WORDS); Assert.AreNotEqual(string.Empty, person.Title, wordFail); }
public void TitleResourcesLoad() { var post = Angie.FastMake <BlogPost>(); string titleFail = string.Format(Angie.Defaults.STRING_LOADFAIL, Angie.Defaults.FILE_TITLES); Assert.AreNotEqual(string.Empty, post.Title, titleFail); }
public void LastNamesResourcesLoad() { var person = Angie.FastMake <Person>(); string nameFail = string.Format(Angie.Defaults.STRING_LOADFAIL, Angie.Defaults.FILE_LAST_NAMES); Assert.AreNotEqual(string.Empty, person.LastName, nameFail); }
public void EmailAddressInNewClassIsValid() { Person person = Angie.FastMake <Person>(); Regex regex = new Regex(@"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$"); Match match = regex.Match(person.EmailAddress); Assert.IsTrue(match.Success, "Invalid Email Address: {0}", person.EmailAddress); }
public void ShortMinNotExceededOnGeneratedValue() { short minNumberOfKids = 5; Angie.Default() .MinShort(minNumberOfKids); for (int i = 0; i < 500; i++) { var instance = Angie .FastMake <ClassWithShortProperty>(); if (!(instance.ShortProperty >= minNumberOfKids)) { Assert.Fail("Short min was exceeded: {0} ", instance.ShortProperty); } } }
public void ShortMaxNotExceededOnGeneratedValue() { short maxShort = 4; Angie.Default() .MaxShort(maxShort); for (int i = 0; i < 500; i++) { var instance = Angie .FastMake <ClassWithShortProperty>(); if (!(instance.ShortProperty <= maxShort)) { Assert.Fail("Short max was exceeded: {0} ", instance.ShortProperty); } } }
public void IntMaxNotExceededOnGeneratedValue() { var maxNumberOfKids = 5; Angie.Default() .MaxInt(maxNumberOfKids); for (int i = 0; i < 500; i++) { var person = Angie .FastMake <Person>(); if (!(person.NumberOfKids <= maxNumberOfKids)) { Assert.Fail("Int max was exceeded: {0} ", person.NumberOfKids); } } }
public void StringInNewClassIsPopulated() { var person = Angie.FastMake <Person>(); Assert.IsTrue(!string.IsNullOrEmpty(person.FirstName)); }
public void UsaStateIsFilled() { var location = Angie.FastMake <AmericanLocation>(); Assert.IsFalse(string.IsNullOrEmpty(location.State)); }
public void IntInNewClassIsPopulated() { var person = Angie.FastMake <Person>(); Assert.IsTrue(person.NumberOfKids != default(int)); }
public void CanadianProvinceIsFilled() { var location = Angie.FastMake <CanadianLocation>(); Assert.IsFalse(string.IsNullOrEmpty(location.Province)); }
public void PhoneNumberInNewClassIsPopulated() { var person = Angie.FastMake <Person>(); Assert.IsTrue(!string.IsNullOrEmpty(person.PhoneNumber)); }
public void DateTimesAreInitialized() { var post = Angie.FastMake <BlogPost>(); Assert.IsTrue(post.CreateDate != default(DateTime)); }
public void TestThatAdditionalFiltersAreFoundAndUsed() { TestClass testClass = Angie.FastMake <TestClass>(); Assert.AreEqual(PluginPropertyFiller.Value, testClass.TestProperty); }
public void AgeIsAlwaysPositive() { var person = Angie.FastMake <Person>(); Assert.IsTrue(person.Age >= 0); }