Exemplo n.º 1
0
        public void GiveNullIfUserDoesNotExist()
        {
            var sut    = new MongoSuperService(MongoTestIP);
            var actual = sut.GetUserById("jilly");

            actual.Should().BeNull(because: "User does not exist.");
        }
Exemplo n.º 2
0
        public void GiveUserIfUserExists()
        {
            AddUserToDatabase("joe");
            var sut    = new MongoSuperService(MongoTestIP);
            var actual = sut.GetUserById("joe");

            actual.Should().NotBeNull(because: "User is in the database.");
            actual.UserName.Should().NotBeNull(because: "It is requried to be stored in the database.");
            actual.UserName.Should().Be("joe");
        }