public void Two_Uuids_initialized_by_Empty_are_equal() { Given("a first Uuid initialized with 'Empty'", context => context.State.uuid1 = Uuid.Empty()) .And("a second Uuid initialized with 'Empty'", context => context.State.uuid2 = Uuid.Empty()) .When("both Uuids will be compared", context => context.State.result = (((Uuid)context.State.uuid1) == ((Uuid)context.State.uuid2))) .Then("they should be equal", context => context.State.result); }
public void Int32_to_Uuid() { Int64 value1 = 0; Int64 value2 = 0; var uuid = new Uuid(); Given("a first Int64 value: '54'", context => value1 = 54) .And("a second Int64 value: '6841266'", context => value2 = 6841266) .And("an empty Uuid", context => uuid = Uuid.Empty()) .When("the first value will be set as first long L1 of the empty Uuid", context => uuid.AsLong.L1 = value1) .And("the second value will be set as second long L2 of the empty Uuid", context => uuid.AsLong.L2 = value2) .Then("the Uuid as string should be '00000036-0000-0000-b263-680000000000'", context => (uuid.ToString().Equals("00000036-0000-0000-b263-680000000000", StringComparison.OrdinalIgnoreCase))); }