mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-02 09:09:37 +00:00
fix for bug 2471: accept null as boat class name and using default values for the boat class in this case
This commit is contained in:
1 parent
a1abcd704c
commit
e6e146a2d4
3 files changed
+29
-6
No files matched your search
Executable
+25
@@ -0,0 +1,25 @@
|
||||
package com.sap.sailing.domain.common;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertSame;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.sap.sailing.domain.base.BoatClass;
|
||||
import com.sap.sailing.domain.base.DomainFactory;
|
||||
|
||||
public class BoatClassWithNullNameTest {
|
||||
/**
|
||||
* See bug 2471
|
||||
*/
|
||||
@Test
|
||||
public void testCreatingBoatClassWithNullName() {
|
||||
DomainFactory domainFactory = DomainFactory.INSTANCE;
|
||||
BoatClass boatClass = domainFactory.getOrCreateBoatClass(null);
|
||||
assertNotNull(boatClass);
|
||||
assertNull(boatClass.getName());
|
||||
BoatClass boatClass2 = domainFactory.getOrCreateBoatClass(null);
|
||||
assertSame(boatClass, boatClass2);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user