public void GivenIAmRegisteredWithTheFollowingData(TechTalk.SpecFlow.Table table)
{
var tableSerialized = new SerializableTable(table);
ScenarioContext.Current["username"] = tableSerialized.Rows[0]["email"];
ScenarioContext.Current["password"] = tableSerialized.Rows[0]["password"];
//mobile = tableSerialized.Rows[0]["mobile"];
//gender = tableSerialized.Rows[0]["gender"];
Deleporter.Run(() =>
{
var mockRepository = new Mock<IRegisterRepository>();
mockRepository.Setup(x => x.Get(tableSerialized.Rows[0]["email"]))
.Returns((from row in tableSerialized.Rows
select new RegisterEntry
{
Name = tableSerialized.Rows[0]["name"],
Password = tableSerialized.Rows[0]["password"],
//ConfirmPassword = tableSerialized.Rows[0]["confirm password"],
Email = tableSerialized.Rows[0]["email"],
Mobile = tableSerialized.Rows[0]["mobile"],
Gender = Convert.ToChar(tableSerialized.Rows[0]["gender"][0]),
Activated = tableSerialized.Rows[0]["activated"] == "yes" ? true : false
}).ToList()[0]);
NinjectControllerFactoryUtils.TemporarilyReplaceBinding<IRegisterRepository>(mockRepository.Object);
});
//ScenarioContext.Current.Pending();
}