public void WhenITryToLoginWithWrongAccount(string wichAccount) { if (wichAccount == "right") { LoginService.Login(RegistrationService.RegisterNewUser(AccountBuilder.CreateAccount())); } else { LoginService.Login(AccountBuilder.CreateAccount()); } }
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)); } }
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(); }
public void WhenIDeleteThePost() { GivenIAmLoggedAsModerator(); PostService.DeletePost(PostBuilder.GeneratePost(LoginService.Login(RegistrationService.RegisterNewUser(AccountBuilder.CreateAccount())))); }
public void GivenThereIsSomePost() { PostService.AddPost(PostBuilder.GeneratePost(LoginService.Login(RegistrationService.RegisterNewUser(AccountBuilder.CreateAccount())))); }
public void GivenIAmLoggedAsModerator() { LoginService.Login(RegistrationService.RegisterNewUser(AccountBuilder.CreateAccount())); }
public void GivenIRegisteredAUser() { RegistrationService.RegisterNewUser(AccountBuilder.CreateAccount()); }