Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why do you use PDateTime in the sample code? #53

Closed
vsix27 opened this issue Dec 26, 2015 · 2 comments
Closed

Why do you use PDateTime in the sample code? #53

vsix27 opened this issue Dec 26, 2015 · 2 comments

Comments

@vsix27
Copy link

vsix27 commented Dec 26, 2015

your readme https://github.com/urasandesu/Prig/blob/master/README.md uses PDateTime which is not anywhere in the scope - this is your custom class i believe... - https://gist.github.com/urasandesu/8751367

having that, what is the meaning of example???:

[Test]
public void IsNowLunchBreak_should_return_false_when_11_oclock() {
// IndirectionsContext can minimize the influence of the API replacement.
using (new IndirectionsContext())
{
// Arrange
// Replace DateTime.Now body. Hereafter, DateTime.Now will return only 2013/12/13 11:00:00.
PDateTime.NowGet().Body = () => new DateTime(2013, 12, 13, 11, 00, 00);

            // Act
            var result = LifeInfo.IsNowLunchBreak();

            // Assert
            Assert.IsFalse(result);
        }
    }
@urasandesu
Copy link
Owner

PDateTime is a Prig Type, so it will be generated automatically based on Stub Settings File(in QUICK TOUR case, the settings is in mscorlib.v4.0.30319.v4.0.0.0.prig). If you can't find the type, the auto generation has possibly failed.

Was the Step 3 success?

@urasandesu
Copy link
Owner

For your information, the gist is just a memo for the design of Prig Type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants