Example #1
0
 public void CreateAnonymousStringWillPrefixName()
 {
     // Fixture setup
     string expectedText = "Anonymous text";
     Fixture sut = new Fixture();
     // Exercise system
     string result = sut.Create(expectedText);
     // Verify outcome
     string actualText = new TextGuidRegex().GetText(result);
     Assert.Equal<string>(expectedText, actualText);
     // Teardown
 }
Example #2
0
 public void CreateAnonymousWithStringPropertyWillAppendPropertyNameToString()
 {
     // Fixture setup
     string expectedName = "Property";
     Fixture sut = new Fixture();
     // Exercise system
     PropertyHolder<string> result = sut.Create<PropertyHolder<string>>();
     // Verify outcome
     string propertyValue = result.Property;
     string text = new TextGuidRegex().GetText(propertyValue);
     Assert.Equal<string>(expectedName, text);
     // Teardown
 }
Example #3
0
 public void CreateAnonymousStringWillAppendGuid()
 {
     // Fixture setup
     string anonymousText = "Anonymous text";
     Fixture sut = new Fixture();
     // Exercise system
     string result = sut.Create(anonymousText);
     // Verify outcome
     string guidString = new TextGuidRegex().GetGuid(result);
     Guid g = new Guid(guidString);
     Assert.NotEqual<Guid>(Guid.Empty, g);
     // Teardown
 }