package uk.co.benjiweber.expressions;

import org.junit.Test;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static uk.co.benjiweber.expressions.Property.get;

public class PropertyTest {

    static class Person {
        private String name;
        public Property<String> Name = get(() -> name).set(value -> this.name = value);
    }

    @Test
    public void property() {
        Person person = new Person();
        assertNull(person.Name.get());
        person.Name.set("Bob");
        assertEquals("Bob", person.Name.get());
        person.Name.set("Bill");
        assertEquals("Bill", person.Name.get());
    }
}

@@ -301,16 +301,22 @@
  public 
+final 
 Property
@@ -495,32 +495,66 @@
 on.Name.get());%0A
+        assertNull(person.name);%0A%0A
         person.N
@@ -609,32 +609,75 @@
 on.Name.get());%0A
+        assertEquals(%22Bob%22, person.name);%0A%0A
         person.N
@@ -738,20 +738,63 @@
 ame.get());%0A
+        assertEquals(%22Bill%22, person.name);%0A
     %7D%0A%7D%0A

Add clarifying assertions to PropertyTest