Exemple #1
0
 public void WhenITryToLoginWithWrongAccount(string wichAccount)
 {
     if (wichAccount == "right")
     {
         LoginService.Login(RegistrationService.RegisterNewUser(AccountBuilder.CreateAccount()));
     }
     else
     {
         LoginService.Login(AccountBuilder.CreateAccount());
     }
 }
Exemple #2
0
        public void ThenPostIsNotDisplayedOnMainPage(string isDisplayed)
        {
            Post post = PostBuilder.GeneratePost(RegistrationService.RegisterNewUser(AccountBuilder.CreateAccount()));

            PostService.AddPost(post);
            if (isDisplayed != "not")
            {
                Assert.IsTrue(PostService.IsPostDisplayed(post));
            }
            else
            {
                Assert.IsFalse(PostService.IsPostDisplayed(post));
            }
        }
Exemple #3
0
        static void Main(string[] args)
        {
            AccountBuilder accountBuilder = new AccountBuilder(12345);

            accountBuilder.AccountBalance    = 5000;
            accountBuilder.AccountHolderName = "Vishal";
            accountBuilder.BranchName        = "Sion";
            Account account = accountBuilder.CreateAccount();

            Console.WriteLine($"Account Number : {account.AccountNumber}" +
                              $"\nAccount Holder Name : {account.AccountHolderName}" +
                              $"\nAccount Balance : {account.AccountBalance}" +
                              $"\nBranch Name : {account.BranchName}" +

                              $"\nInterest Rate : {account.InterestRate}");
            Console.ReadLine();
        }
Exemple #4
0
 public void WhenIDeleteThePost()
 {
     GivenIAmLoggedAsModerator();
     PostService.DeletePost(PostBuilder.GeneratePost(LoginService.Login(RegistrationService.RegisterNewUser(AccountBuilder.CreateAccount()))));
 }
Exemple #5
0
 public void GivenThereIsSomePost()
 {
     PostService.AddPost(PostBuilder.GeneratePost(LoginService.Login(RegistrationService.RegisterNewUser(AccountBuilder.CreateAccount()))));
 }
Exemple #6
0
 public void GivenIAmLoggedAsModerator()
 {
     LoginService.Login(RegistrationService.RegisterNewUser(AccountBuilder.CreateAccount()));
 }
Exemple #7
0
 public void GivenIRegisteredAUser()
 {
     RegistrationService.RegisterNewUser(AccountBuilder.CreateAccount());
 }