Пример #1
0
    public void Register_No_Exceptions()
    {
        var server = new PakeServer();
        var client = new PakeClient(server);

        client.Register("*****@*****.**", "foo bar non");
    }
Пример #2
0
    public void Register_Null_Password_Throws()
    {
        var server = new PakeServer();
        var client = new PakeClient(server);

        Assert.ThrowsAny <Exception>(
            () => client.Register("*****@*****.**", null !));
    }
Пример #3
0
    public void Register_Null_Username_Throws()
    {
        var server = new PakeServer();
        var client = new PakeClient(server);

        Assert.ThrowsAny <Exception>(
            () => client.Register(null !, null !));
    }
Пример #4
0
    public void Start_Session()
    {
        var I = "*****@*****.**";
        var P = "foo bar non";

        var server = new PakeServer();
        var client = new PakeClient(server);

        client.Register(I, P);
        client.StartSession(I, P);
    }
Пример #5
0
    public void Start_Session_With_Bad_Password()
    {
        var I = "*****@*****.**";
        var P = "foo bar non";

        var server = new PakeServer();
        var client = new PakeClient(server);

        client.Register(I, P);
        Assert.ThrowsAny <Exception>(
            () => client.StartSession(I, "bad password"));
    }