public void NewClientWithAllParams() { Mock <IClientRepository> _mock = new Mock <IClientRepository>(); NewClient cli = new NewClient { Name = "alexandre", UserName = "******", Email = "*****@*****.**", Password = "******", Clienteuniqueid = "35718362866" }; Assert.IsTrue(cli.IsValid(_mock.Object)); }
public void NewClientWithExistentUserName() { Mock <IClientRepository> _mock = new Mock <IClientRepository>(); Client client = new Client("test", "testealex", "*****@*****.**", "123456", "12345678911"); _mock.Setup(x => x.GetByUsername("testealex")).Returns(client); NewClient cli = new NewClient { Name = "alexandre", UserName = "******", Email = "*****@*****.**", Password = "******", Clienteuniqueid = "35718362866" }; Assert.IsFalse(cli.IsValid(_mock.Object)); }