Пример #1
0
        public void Test_IsValid_joey_1234666666_Should_Return_True()
        {
            var target   = new AuthService();
            var account  = "cash";
            var password = "******";

            IProfileDao stubProfileDao = Substitute.For <IProfileDao>();

            stubProfileDao.GetPassword("cash").ReturnsForAnyArgs("1234");
            stubProfileDao.GetToken("cash").ReturnsForAnyArgs("666666");

            target.MyProfileDao = stubProfileDao;

            var actual = target.IsValid(account, password);

            var expected = true;

            actual.Should().Be(expected);
        }